aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/xmlgraphics-commons-1.4svn.jarbin528722 -> 528828 bytes
-rw-r--r--src/java/org/apache/fop/render/afp/AFPImageGraphics2DFactory.java7
-rw-r--r--src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java1
3 files changed, 8 insertions, 0 deletions
diff --git a/lib/xmlgraphics-commons-1.4svn.jar b/lib/xmlgraphics-commons-1.4svn.jar
index 7328fa62b..a840cd8f9 100644
--- a/lib/xmlgraphics-commons-1.4svn.jar
+++ b/lib/xmlgraphics-commons-1.4svn.jar
Binary files differ
diff --git a/src/java/org/apache/fop/render/afp/AFPImageGraphics2DFactory.java b/src/java/org/apache/fop/render/afp/AFPImageGraphics2DFactory.java
index 5128b96cf..dc86b8c38 100644
--- a/src/java/org/apache/fop/render/afp/AFPImageGraphics2DFactory.java
+++ b/src/java/org/apache/fop/render/afp/AFPImageGraphics2DFactory.java
@@ -24,6 +24,7 @@ import java.io.IOException;
import org.apache.xmlgraphics.image.loader.impl.ImageGraphics2D;
import org.apache.xmlgraphics.java2d.Graphics2DImagePainter;
+import org.apache.xmlgraphics.util.MimeConstants;
/**
@@ -50,6 +51,10 @@ public class AFPImageGraphics2DFactory extends AFPDataObjectInfoFactory {
AFPGraphicsObjectInfo graphicsObjectInfo
= (AFPGraphicsObjectInfo)super.create(afpImageInfo);
+ // set mime type (unsupported by MOD:CA registry)
+ graphicsObjectInfo.setMimeType(MimeConstants.MIME_AFP_GOCA);
+
+ // set graphics 2d
AFPGraphics2DAdapter g2dAdapter = afpImageInfo.g2dAdapter;
AFPGraphics2D g2d = g2dAdapter.getGraphics2D();
AFPInfo afpInfo = AFPSVGHandler.getAFPInfo(afpImageInfo.rendererContext);
@@ -58,10 +63,12 @@ public class AFPImageGraphics2DFactory extends AFPDataObjectInfoFactory {
g2d.setState(state);
graphicsObjectInfo.setGraphics2D(g2d);
+ // set painter
ImageGraphics2D imageG2D = (ImageGraphics2D)afpImageInfo.img;
Graphics2DImagePainter painter = imageG2D.getGraphics2DImagePainter();
graphicsObjectInfo.setPainter(painter);
+ // set object area
AFPObjectAreaInfo objectAreaInfo = graphicsObjectInfo.getObjectAreaInfo();
Rectangle area = new Rectangle(objectAreaInfo.getWidth(), objectAreaInfo.getHeight());
graphicsObjectInfo.setArea(area);
diff --git a/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java b/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
index 85784af55..aba38af2f 100644
--- a/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
+++ b/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
@@ -240,6 +240,7 @@ public class AFPRendererConfigurator extends PrintRendererConfigurator {
} else {
afpRenderer.setColorImages(true);
}
+
// images are embedded directly without conversion to bitmapped IOCA
afpRenderer.setNativeImages(imagesCfg.getAttributeAsBoolean("native", false));