]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugfix: take rotation into account also when resource level is not inline
authorVincent Hennebert <vhennebert@apache.org>
Tue, 28 Apr 2009 15:34:47 +0000 (15:34 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Tue, 28 Apr 2009 15:34:47 +0000 (15:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@769436 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/afp/modca/AbstractDataObject.java

index fcab3cb4aafdb35edf643218d0369aa1283b5abf..d76de925932509d5f89b2709eb19f62cdaed2ca3 100644 (file)
@@ -34,7 +34,8 @@ import org.apache.fop.afp.Startable;
  * Abstract base class used by the ImageObject and GraphicsObject which both
  * have define an ObjectEnvironmentGroup
  */
-public abstract class AbstractDataObject extends AbstractNamedAFPObject implements Startable, Completable {
+public abstract class AbstractDataObject extends AbstractNamedAFPObject
+        implements Startable, Completable {
 
     /** the object environment group */
     protected ObjectEnvironmentGroup objectEnvironmentGroup = null;
@@ -81,14 +82,14 @@ public abstract class AbstractDataObject extends AbstractNamedAFPObject implemen
         AFPResourceInfo resourceInfo = dataObjectInfo.getResourceInfo();
         AFPResourceLevel resourceLevel = resourceInfo.getLevel();
         ObjectAreaPosition objectAreaPosition = null;
+        int rotation = objectAreaInfo.getRotation();
         if (resourceLevel.isInline()) {
             int x = objectAreaInfo.getX();
             int y = objectAreaInfo.getY();
-            int rotation = objectAreaInfo.getRotation();
             objectAreaPosition = factory.createObjectAreaPosition(x, y, rotation);
         } else {
             // positional values are specified in the oaOffset of the include object
-            objectAreaPosition = factory.createObjectAreaPosition(0, 0, 0);
+            objectAreaPosition = factory.createObjectAreaPosition(0, 0, rotation);
         }
         objectAreaPosition.setReferenceCoordinateSystem(
                 ObjectAreaPosition.REFCSYS_PAGE_SEGMENT_RELATIVE);