public class AFPSVGHandler extends AbstractGenericSVGHandler
AFPGraphics2DAdapterHANDLE_ALLFOREIGN_ATTRIBUTES, HANDLER_CONFIGURATION, HEIGHT, OUTPUT_STREAM, PAGE_VIEWPORT, WIDTH, XPOS, YPOS| Constructor and Description |
|---|
AFPSVGHandler() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.batik.bridge.BridgeContext |
createBridgeContext(FOUserAgent userAgent,
AFPGraphics2D g2d) |
void |
handleXML(RendererContext context,
org.w3c.dom.Document doc,
java.lang.String ns)
Handle an external xml document inside a Foreign Object Area.
|
protected void |
renderSVGDocument(RendererContext rendererContext,
org.w3c.dom.Document doc)
Render the SVG document.
|
boolean |
supportsRenderer(Renderer renderer)
Checks if this XMLHandler supports handling an XML namespace for a particular renderer.
|
protected void |
updateRendererContext(RendererContext context)
Override this method to update the renderer context if it needs special settings for
certain conditions.
|
buildGraphicsNode, createGraphics2DImagePainter, getDocumentURI, getImageSize, getNamespacepublic void handleXML(RendererContext context, org.w3c.dom.Document doc, java.lang.String ns) throws java.lang.Exception
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).
handleXML in interface XMLHandlerhandleXML in class AbstractGenericSVGHandlercontext - The RendererContext (contains the user agent)doc - A DOM containing the foreign object to be
processedns - The Namespace of the foreign objectjava.lang.Exception - If an error occurs during processing.protected void renderSVGDocument(RendererContext rendererContext, org.w3c.dom.Document doc) throws java.io.IOException
renderSVGDocument in class AbstractGenericSVGHandlerrendererContext - the renderer contextdoc - the SVG documentjava.io.IOException - In case of an I/O error while painting the imagepublic static org.apache.batik.bridge.BridgeContext createBridgeContext(FOUserAgent userAgent, AFPGraphics2D g2d)
userAgent - a user agent instanceg2d - a graphics contextpublic boolean supportsRenderer(Renderer renderer)
renderer - the renderer for which to check.protected void updateRendererContext(RendererContext context)
updateRendererContext in class AbstractGenericSVGHandlercontext - the renderer contextCopyright 1999-2022 The Apache Software Foundation. All Rights Reserved.