From: Adrian Cumiskey Date: Fri, 18 Jul 2008 15:18:03 +0000 (+0000) Subject: Replaced PresentationSpaceMixingRulesTriplet (currently unsupported in AFP environmen... X-Git-Tag: fop-1_0~376^2~131 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=49868791f418b4cb7494e6ab9b402265253aca41;p=xmlgraphics-fop.git Replaced PresentationSpaceMixingRulesTriplet (currently unsupported in AFP environments...) with PresentationSpaceResetMixingTriplet. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@677932 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/render/afp/modca/ObjectAreaDescriptor.java b/src/java/org/apache/fop/render/afp/modca/ObjectAreaDescriptor.java index d09009f64..bbfd42c53 100644 --- a/src/java/org/apache/fop/render/afp/modca/ObjectAreaDescriptor.java +++ b/src/java/org/apache/fop/render/afp/modca/ObjectAreaDescriptor.java @@ -27,6 +27,7 @@ import org.apache.fop.render.afp.modca.triplets.DescriptorPositionTriplet; import org.apache.fop.render.afp.modca.triplets.MeasurementUnitsTriplet; import org.apache.fop.render.afp.modca.triplets.ObjectAreaSizeTriplet; import org.apache.fop.render.afp.modca.triplets.PresentationSpaceMixingRulesTriplet; +import org.apache.fop.render.afp.modca.triplets.PresentationSpaceResetMixingTriplet; import org.apache.fop.render.afp.tools.BinaryUtils; /** @@ -53,15 +54,18 @@ public class ObjectAreaDescriptor extends AbstractDescriptor { protected byte[] getTripletData() throws IOException { if (tripletData == null) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); - final byte descriptorPositionId = 0x01; - new DescriptorPositionTriplet(descriptorPositionId).write(bos); + + // Specifies the associated ObjectAreaPosition structured field + final byte oapId = 0x01; + new DescriptorPositionTriplet(oapId).write(bos); + new MeasurementUnitsTriplet(widthRes, heightRes).write(bos); + new ObjectAreaSizeTriplet(width, height).write(bos); - byte[] mixingRules = new byte[] { - PresentationSpaceMixingRulesTriplet.RULE_FORE_ON_BACK, - PresentationSpaceMixingRulesTriplet.OVERPAINT - }; - new PresentationSpaceMixingRulesTriplet(mixingRules).write(bos); + + new PresentationSpaceResetMixingTriplet( + PresentationSpaceResetMixingTriplet.NOT_RESET).write(bos); + this.tripletData = bos.toByteArray(); } return this.tripletData;