diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-10-14 10:19:16 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-10-14 10:19:16 +0000 |
commit | 13e70f13e05d417c46b76d683109334d085bc83d (patch) | |
tree | 035cd3bf4b6c7d88bf03c79bfb19468fe257413a /src/java/org/apache/fop/render/afp/AFPSVGHandler.java | |
parent | 2635df8fae6c6cb036cc99e7018a879697b362af (diff) | |
download | xmlgraphics-fop-13e70f13e05d417c46b76d683109334d085bc83d.tar.gz xmlgraphics-fop-13e70f13e05d417c46b76d683109334d085bc83d.zip |
Fixes resource naming/levelling for fox:conversion-mode="bitmap" GOCA fallback.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@704434 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/afp/AFPSVGHandler.java')
-rw-r--r-- | src/java/org/apache/fop/render/afp/AFPSVGHandler.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/render/afp/AFPSVGHandler.java b/src/java/org/apache/fop/render/afp/AFPSVGHandler.java index 508c13efb..4c456a0b6 100644 --- a/src/java/org/apache/fop/render/afp/AFPSVGHandler.java +++ b/src/java/org/apache/fop/render/afp/AFPSVGHandler.java @@ -82,11 +82,16 @@ public class AFPSVGHandler extends AbstractGenericSVGHandler { afpi.setResourceManager(((AFPResourceManager)context.getProperty( AFPRendererContextConstants.AFP_RESOURCE_MANAGER))); - Map foreign = (Map)context.getProperty(RendererContextConstants.FOREIGN_ATTRIBUTES); - QName qName = new QName(ExtensionElementMapping.URI, null, "conversion-mode"); - if (foreign != null - && "bitmap".equalsIgnoreCase((String)foreign.get(qName))) { - afpi.setPaintAsBitmap(true); + Map foreignAttributes = (Map)context.getProperty(RendererContextConstants.FOREIGN_ATTRIBUTES); + if (foreignAttributes != null) { + AFPForeignAttributeReader foreignAttributeReader = new AFPForeignAttributeReader(); + AFPResourceInfo resourceInfo = foreignAttributeReader.getResourceInfo(foreignAttributes); + afpi.setResourceInfo(resourceInfo); + + QName qName = new QName(ExtensionElementMapping.URI, null, "conversion-mode"); + if ("bitmap".equalsIgnoreCase((String)foreignAttributes.get(qName))) { + afpi.setPaintAsBitmap(true); + } } return afpi; } @@ -225,7 +230,7 @@ public class AFPSVGHandler extends AbstractGenericSVGHandler { // Set the object area info graphicsObjectInfo.setObjectAreaInfo(objectAreaInfo); - AFPResourceManager resourceManager = afpInfo.getAFPResourceManager(); + AFPResourceManager resourceManager = afpInfo.getResourceManager(); // Create the graphics object resourceManager.createObject(graphicsObjectInfo); |