org.apache.fop.render.ps
Class PSSVGHandler
java.lang.Object
|
+--org.apache.fop.render.ps.PSSVGHandler
- All Implemented Interfaces:
- PSRendererContextConstants, RendererContextConstants, XMLHandler
- public class PSSVGHandler
- extends java.lang.Object
- implements XMLHandler, PSRendererContextConstants
PostScript XML handler for SVG. Uses Apache Batik for SVG processing.
This handler handles XML for foreign objects when rendering to PostScript.
It renders SVG to the PostScript document using the PSGraphics2D.
The properties from the PostScript renderer are subject to change.
- Version:
- $Id: PSSVGHandler.java 391332 2006-04-04 15:15:23Z jeremias $
Inner Class Summary |
static class |
PSSVGHandler.PSInfo
PostScript information structure for drawing the XML document. |
Constructor Summary |
PSSVGHandler()
Create a new PostScript XML handler for use by the PostScript renderer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PSSVGHandler
public PSSVGHandler()
- Create a new PostScript XML handler for use by the PostScript renderer.
handleXML
public void handleXML(RendererContext context,
org.w3c.dom.Document doc,
java.lang.String ns)
throws java.lang.Exception
- Description copied from interface:
XMLHandler
Handle an external xml document inside a Foreign Object Area.
This may throw an exception if for some reason it cannot be handled. The
caller is expected to deal with this exception.
The implementation may convert the XML document internally to another
XML dialect (SVG, for example) and call renderXML() on the AbstractRenderer
again (which can be retrieved through the RendererContext).
- Specified by:
handleXML
in interface XMLHandler
- See Also:
XMLHandler
getPSInfo
public static PSSVGHandler.PSInfo getPSInfo(RendererContext context)
- Get the pdf information from the render context.
- Parameters:
context
- the renderer context- Returns:
- the pdf information retrieved from the context
renderSVGDocument
protected void renderSVGDocument(RendererContext context,
org.w3c.dom.Document doc,
PSSVGHandler.PSInfo psInfo)
- Render the svg document.
- Parameters:
context
- the renderer contextdoc
- the svg documentpsInfo
- the pdf information of the current context
supportsRenderer
public boolean supportsRenderer(Renderer renderer)
- Description copied from interface:
XMLHandler
- Checks if this XMLHandler supports handling an XML namespace for a particular renderer.
- Specified by:
supportsRenderer
in interface XMLHandler
- See Also:
XMLHandler.supportsRenderer(org.apache.fop.render.Renderer)
getNamespace
public java.lang.String getNamespace()
- Specified by:
getNamespace
in interface XMLHandler
- See Also:
XMLHandler.getNamespace()
Copyright 1999-2006 The Apache Software Foundation. All Rights Reserved.