On Tuesday 09 July 2002 12:44 pm, Herbert Voss wrote:
> Angus Leeming wrote:
> > I'd rather put this fix into xformsImage::getWidth.
>
> oh, sorry. never thought of this part ...
> looked only into the files of src/graphics ...
> changed it in xformsImage and it solves now the view of
> the other images, too.

Great.

> > What version of xforms are you using? You could specialise with some
> > nasty #ifdef
>
> configure:10331: checking xforms header version
> configure:10352: result: 0.89.6

Ok, let's assume that all versions of xforms <= 0.89.6 are broken in this 
regard.

Can you do some more testing for me. I assume that the bug occurs when the 
file is loaded. Subsequently cropping, resizing etc should not be "penalised" 
like this.

Could you apply the patch (attached) and then do some scaling, cropping etc.

Angus
? xformsImage.diff
Index: xformsImage.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/xformsImage.C,v
retrieving revision 1.1
diff -u -p -r1.1 xformsImage.C
--- xformsImage.C	28 Jun 2002 11:22:55 -0000	1.1
+++ xformsImage.C	9 Jul 2002 12:51:43 -0000
@@ -327,6 +327,11 @@ void xformsImage::statusCB(string const 
 	if (prefixIs(status_message, "Done Reading")) {
 		if (image_) {
 			flimage_close(image_);
+
+#if FL_VERSION == 0 && FL_REVISION == 89 && FL_FIXLEVEL <= 6
+			// A horrible fudge but it appears to fix the bug.
+			image_->w += 5;
+#endif
 		}
 
 		finishedLoading(true);

Reply via email to