]> git.lyx.org Git - lyx.git/commitdiff
Work-around for the can't rotate by 270degs bug.
authorAngus Leeming <leeming@lyx.org>
Tue, 7 May 2002 10:03:07 +0000 (10:03 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 7 May 2002 10:03:07 +0000 (10:03 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4134 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/xformsGImage.C

index d4248b2fe2723ebfbecc8249a608dfd51e4f29b1..ad35db0270bd2e7a41aba869ba0f056694897a00 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-03  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * xformsGImage.C (rotate): work-around xforms bug when rotating by
+       270 degs.
+
 2002-05-02  Herbert Voss  <voss@perce.de>
 
        * FormBibtex.C (apply): a change from a style to an empty one
index ef0059e50bbbc9e2170ec5b330ee6dd1f34404d8..9fca72733f7e6edfbc390d43d53472b5c68faf79 100644 (file)
@@ -281,7 +281,16 @@ void xformsGImage::rotate(GParams const & params)
 
        // The angle passed to flimage_rotate is the angle in one-tenth of a
        // degree units.
-       flimage_rotate(image_, params.angle * 10, FLIMAGE_SUBPIXEL);
+
+       // Work around xforms bug when params.angle == 270
+       // the 'InternalError: bad special angle' error.
+       // This bug fix is not needed in xforms 1.0 and greater.
+       if (params.angle == 270) {
+               flimage_rotate(image_,  900, FLIMAGE_SUBPIXEL);
+               flimage_rotate(image_, 1800, FLIMAGE_SUBPIXEL);
+       } else {
+               flimage_rotate(image_, params.angle * 10, FLIMAGE_SUBPIXEL);
+       }
 }