aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-12-16 14:40:20 +0000
committerJeremias Maerki <jeremias@apache.org>2005-12-16 14:40:20 +0000
commitcd600b952b6326195b1670e6a17af75d51f46b57 (patch)
tree814b0f854cb41391f498b25a3412a8ad53d76f96 /src/java/org/apache/fop/render/java2d/Java2DRenderer.java
parent811fd3eefbfb06cb945bb3599523b7f3a15f251e (diff)
downloadxmlgraphics-fop-cd600b952b6326195b1670e6a17af75d51f46b57.tar.gz
xmlgraphics-fop-cd600b952b6326195b1670e6a17af75d51f46b57.zip
XMLHandler interface changed so it reports whether it supports a particular Renderer instead of reporting the MIME type. One MIME type could be implemented by multiple Renderer implementations so conflicts could occur. Almost all XMLHandler implementations will have a dependency on a particular Renderer implementation.
XMLHandlers are now configurable. Standard XMLHandlers now get registered through service lookup. Simplification: XMLHandlers don't need nested classes for the handling functionality anymore. If Batik, for example, is not in the classpath it will already be detected while registering the XMLHandlers. The RendererContextConstants interface now standardizes some of the keys used in the RendererContext and helps with actually decoupling the XMLHandler implementations from the renderers. This is one step towards making Batik an optional dependency and making it possible to move the SVG functionality to a separate place later. Extracted the SVG XMLHandler functionality from the sandbox SVGRenderer into a separate class following the example of the other renderers. Bugfix in PSSVGHandler: Fixed a copy/paste error which could lead to wrong clipping of an SVG image for PostScript output. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@357166 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/java2d/Java2DRenderer.java')
-rw-r--r--src/java/org/apache/fop/render/java2d/Java2DRenderer.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/java/org/apache/fop/render/java2d/Java2DRenderer.java b/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
index b1fc3568d..9b0e76f33 100644
--- a/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
+++ b/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
@@ -155,8 +155,6 @@ public abstract class Java2DRenderer extends AbstractRenderer implements Printab
*/
public void setUserAgent(FOUserAgent foUserAgent) {
super.setUserAgent(foUserAgent);
- Java2DSVGHandler xmlHandler = new Java2DSVGHandler(getMimeType());
- userAgent.getXMLHandlerRegistry().addXMLHandler(xmlHandler);
userAgent.setRendererOverride(this); // for document regeneration
}
@@ -1148,14 +1146,14 @@ public abstract class Java2DRenderer extends AbstractRenderer implements Printab
context = new RendererContext(this, getMimeType());
context.setUserAgent(userAgent);
- context.setProperty(Java2DSVGHandler.JAVA2D_STATE, state);
- context.setProperty(Java2DSVGHandler.JAVA2D_XPOS,
+ context.setProperty(Java2DRendererContextConstants.JAVA2D_STATE, state);
+ context.setProperty(Java2DRendererContextConstants.XPOS,
new Integer(currentIPPosition + (int)pos.getX()));
- context.setProperty(Java2DSVGHandler.JAVA2D_YPOS,
+ context.setProperty(Java2DRendererContextConstants.YPOS,
new Integer(currentBPPosition + (int)pos.getY()));
- context.setProperty(Java2DSVGHandler.JAVA2D_WIDTH,
+ context.setProperty(Java2DRendererContextConstants.WIDTH,
new Integer((int)pos.getWidth()));
- context.setProperty(Java2DSVGHandler.JAVA2D_HEIGHT,
+ context.setProperty(Java2DRendererContextConstants.HEIGHT,
new Integer((int) pos.getHeight()));
renderXML(context, doc, ns);