public class ImageConverterSVG2G2D
extends org.apache.xmlgraphics.image.loader.impl.AbstractImageConverter
Note: The target flavor is "generic" Java2D. No Batik-specific bridges are hooked into the conversion process. Specialized renderers may want to provide specialized adapters to profit from target-format features (for example with PDF or PS). This converter is mainly for formats which only support bitmap images or rudimentary Java2D support.
Constructor and Description |
---|
ImageConverterSVG2G2D() |
Modifier and Type | Method and Description |
---|---|
org.apache.xmlgraphics.image.loader.Image |
convert(org.apache.xmlgraphics.image.loader.Image src,
java.util.Map hints) |
protected SimpleSVGUserAgent |
createBatikUserAgent(float pxToMillimeter)
Creates a user agent for Batik.
|
protected org.apache.xmlgraphics.java2d.Graphics2DImagePainter |
createPainter(org.apache.batik.bridge.BridgeContext ctx,
org.apache.batik.gvt.GraphicsNode root,
java.awt.Dimension imageSize)
Creates a Graphics 2D image painter
|
org.apache.xmlgraphics.image.loader.ImageFlavor |
getSourceFlavor() |
org.apache.xmlgraphics.image.loader.ImageFlavor |
getTargetFlavor() |
public org.apache.xmlgraphics.image.loader.Image convert(org.apache.xmlgraphics.image.loader.Image src, java.util.Map hints) throws org.apache.xmlgraphics.image.loader.ImageException
org.apache.xmlgraphics.image.loader.ImageException
protected SimpleSVGUserAgent createBatikUserAgent(float pxToMillimeter)
pxToMillimeter
- the source resolution (in px per millimeter)protected org.apache.xmlgraphics.java2d.Graphics2DImagePainter createPainter(org.apache.batik.bridge.BridgeContext ctx, org.apache.batik.gvt.GraphicsNode root, java.awt.Dimension imageSize)
ctx
- the bridge contextroot
- the graphics node rootimageSize
- the image sizepublic org.apache.xmlgraphics.image.loader.ImageFlavor getSourceFlavor()
public org.apache.xmlgraphics.image.loader.ImageFlavor getTargetFlavor()
Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.