org.apache.batik.svggen

Interface GenericImageHandler

public interface GenericImageHandler

Extends the default ImageHandler interface with calls to allow caching of raster images in generated SVG content.
Method Summary
ElementcreateElement(SVGGeneratorContext generatorContext)
Creates an Element suitable for referring to images.
AffineTransformhandleImage(Image image, Element imageElement, int x, int y, int width, int height, SVGGeneratorContext generatorContext)
The handler should set the xlink:href and return a transform
AffineTransformhandleImage(RenderedImage image, Element imageElement, int x, int y, int width, int height, SVGGeneratorContext generatorContext)
The handler should set the xlink:href tag and return a transform
AffineTransformhandleImage(RenderableImage image, Element imageElement, double x, double y, double width, double height, SVGGeneratorContext generatorContext)
The handler should set the xlink:href tag and return a transform
voidsetDOMTreeManager(DOMTreeManager domTreeManager)
Sets the DomTreeManager this image handler may need to interact with.

Method Detail

createElement

public Element createElement(SVGGeneratorContext generatorContext)
Creates an Element suitable for referring to images. Note that no assumptions can be made about the name of this Element.

handleImage

public AffineTransform handleImage(Image image, Element imageElement, int x, int y, int width, int height, SVGGeneratorContext generatorContext)
The handler should set the xlink:href and return a transform

Parameters: image the image under consideration imageElement the DOM Element for this image x x coordinate y y coordinate width width for rendering height height for rendering generatorContext the SVGGeneratorContext

Returns: transform converting the image dimension to rendered dimension

handleImage

public AffineTransform handleImage(RenderedImage image, Element imageElement, int x, int y, int width, int height, SVGGeneratorContext generatorContext)
The handler should set the xlink:href tag and return a transform

Parameters: image the image under consideration imageElement the DOM Element for this image x x coordinate y y coordinate width width for rendering height height for rendering generatorContext the SVGGeneratorContext

Returns: transform converting the image dimension to rendered dimension

handleImage

public AffineTransform handleImage(RenderableImage image, Element imageElement, double x, double y, double width, double height, SVGGeneratorContext generatorContext)
The handler should set the xlink:href tag and return a transform

Parameters: image the image under consideration imageElement the DOM Element for this image x x coordinate y y coordinate width width for rendering height height for rendering generatorContext the SVGGeneratorContext

Returns: transform converting the image dimension to rendered dimension

setDOMTreeManager

public void setDOMTreeManager(DOMTreeManager domTreeManager)
Sets the DomTreeManager this image handler may need to interact with.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.