You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/08/27 23:47:40 UTC

svn commit: r240459 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/area/CTM.java

Author: jeremias
Date: Sat Aug 27 14:47:36 2005
New Revision: 240459

URL: http://svn.apache.org/viewcvs?rev=240459&view=rev
Log:
Bugzilla #36391:
Fix for negative values for reference orientation. CTM was wrong.
Submitted by: Yannick Valot <yvalot.at.gmail.com>

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/CTM.java   (contents, props changed)

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/CTM.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/CTM.java?rev=240459&r1=240458&r2=240459&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/CTM.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/CTM.java Sat Aug 27 14:47:36 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -157,13 +157,13 @@
      */
     public CTM rotate(double angle) {
         double cos, sin;
-        if (angle == 90.0) {
+        if (angle == 90.0 || angle == -270.0) {
             cos = 0.0;
             sin = 1.0;
-        } else if (angle == 270.0) {
+        } else if (angle == 270.0 || angle == -90.0) {
             cos = 0.0;
             sin = -1.0;
-        } else if (angle == 180.0) {
+        } else if (angle == 180.0 || angle == -180.0) {
             cos = -1.0;
             sin = 0.0;
         } else {
@@ -283,12 +283,15 @@
             // first quadrant. Note: rotation is counter-clockwise
             switch (absRefOrient) {
                 case 90:
+                case -270:
                     ctm = ctm.translate(0, width); // width = absVPrect.height
                     break;
                 case 180:
+                case -180:
                     ctm = ctm.translate(width, height);
                     break;
                 case 270:
+                case -90:
                     ctm = ctm.translate(height, 0); // height = absVPrect.width
                     break;
             }

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/CTM.java
------------------------------------------------------------------------------
    svn:keywords = Id



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org