aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/afp/AFPImageHandlerGraphics2D.java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2009-02-05 10:40:52 +0000
committerJeremias Maerki <jeremias@apache.org>2009-02-05 10:40:52 +0000
commit879e33c0429f91fd9d6734b7d00410b71afbfa1d (patch)
tree7dd4b3b179973708ac5a47ffc82c5ba5b8880228 /src/java/org/apache/fop/render/afp/AFPImageHandlerGraphics2D.java
parent8ab837c32d7a38a7fa7742d335944e251b203a50 (diff)
downloadxmlgraphics-fop-879e33c0429f91fd9d6734b7d00410b71afbfa1d.tar.gz
xmlgraphics-fop-879e33c0429f91fd9d6734b7d00410b71afbfa1d.zip
AFP Output: Added a configuration option to override the resource level defaults in the code. The chosen defaults in code may not always be the best. For example, a user reported that they can't use print-level images for some reason and it is not possible to switch on inlining for background images.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@741068 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/afp/AFPImageHandlerGraphics2D.java')
-rw-r--r--src/java/org/apache/fop/render/afp/AFPImageHandlerGraphics2D.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/java/org/apache/fop/render/afp/AFPImageHandlerGraphics2D.java b/src/java/org/apache/fop/render/afp/AFPImageHandlerGraphics2D.java
index 0780e8a59..63e82f1ae 100644
--- a/src/java/org/apache/fop/render/afp/AFPImageHandlerGraphics2D.java
+++ b/src/java/org/apache/fop/render/afp/AFPImageHandlerGraphics2D.java
@@ -21,16 +21,17 @@ package org.apache.fop.render.afp;
import java.io.IOException;
+import org.apache.xmlgraphics.image.loader.ImageFlavor;
+import org.apache.xmlgraphics.image.loader.impl.ImageGraphics2D;
+import org.apache.xmlgraphics.java2d.Graphics2DImagePainter;
+import org.apache.xmlgraphics.util.MimeConstants;
+
import org.apache.fop.afp.AFPDataObjectInfo;
import org.apache.fop.afp.AFPGraphics2D;
import org.apache.fop.afp.AFPGraphicsObjectInfo;
import org.apache.fop.afp.AFPPaintingState;
import org.apache.fop.afp.AFPResourceInfo;
-import org.apache.fop.afp.AFPResourceLevel;
-import org.apache.xmlgraphics.image.loader.ImageFlavor;
-import org.apache.xmlgraphics.image.loader.impl.ImageGraphics2D;
-import org.apache.xmlgraphics.java2d.Graphics2DImagePainter;
-import org.apache.xmlgraphics.util.MimeConstants;
+import org.apache.fop.afp.modca.ResourceObject;
/**
* PDFImageHandler implementation which handles Graphics2D images.
@@ -65,10 +66,9 @@ public class AFPImageHandlerGraphics2D extends AFPImageHandler {
= (AFPGraphicsObjectInfo)super.generateDataObjectInfo(rendererImageInfo);
AFPResourceInfo resourceInfo = graphicsObjectInfo.getResourceInfo();
- //level not explicitly set/changed so default to inline for GOCA graphic objects
- // (due to a bug in the IBM AFP Workbench Viewer (2.04.01.07), hard copy works just fine)
if (!resourceInfo.levelChanged()) {
- resourceInfo.setLevel(new AFPResourceLevel(AFPResourceLevel.INLINE));
+ resourceInfo.setLevel(afpInfo.getResourceManager().getResourceLevelDefaults()
+ .getDefaultResourceLevel(ResourceObject.TYPE_GRAPHIC));
}
// set mime type (unsupported by MOD:CA registry)