From: Vincent Hennebert Date: Tue, 28 Apr 2009 15:34:47 +0000 (+0000) Subject: Bugfix: take rotation into account also when resource level is not inline X-Git-Tag: fop-1_0~252 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=567829784c0b4a7844299fe708f254b89913a305;p=xmlgraphics-fop.git Bugfix: take rotation into account also when resource level is not inline git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@769436 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/afp/modca/AbstractDataObject.java b/src/java/org/apache/fop/afp/modca/AbstractDataObject.java index fcab3cb4a..d76de9259 100644 --- a/src/java/org/apache/fop/afp/modca/AbstractDataObject.java +++ b/src/java/org/apache/fop/afp/modca/AbstractDataObject.java @@ -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);