org.apache.batik.svggen

Class CachedImageHandlerBase64Encoder

public class CachedImageHandlerBase64Encoder extends DefaultCachedImageHandler

This subclass of ImageHandlerBase64Encoder implements functionality specific to the cached version of the image encoder.
Constructor Summary
CachedImageHandlerBase64Encoder()
Build a CachedImageHandlerBase64Encoder instance.
Method Summary
ElementcreateElement(SVGGeneratorContext generatorContext)
Creates an Element which can refer to an image.
voidencodeImage(BufferedImage buf, OutputStream os)
Uses PNG encoding.
intgetBufferedImageType()
StringgetRefPrefix()
protected AffineTransformhandleTransform(Element imageElement, double x, double y, double srcWidth, double srcHeight, double dstWidth, double dstHeight, SVGGeneratorContext generatorContext)
Determines the transformation needed to get the cached image to scale & position properly.

Constructor Detail

CachedImageHandlerBase64Encoder

public CachedImageHandlerBase64Encoder()
Build a CachedImageHandlerBase64Encoder instance.

Method Detail

createElement

public Element createElement(SVGGeneratorContext generatorContext)
Creates an Element which can refer to an image. Note that no assumptions should be made by the caller about the corresponding SVG tag.

encodeImage

public void encodeImage(BufferedImage buf, OutputStream os)
Uses PNG encoding.

getBufferedImageType

public int getBufferedImageType()

getRefPrefix

public String getRefPrefix()

handleTransform

protected AffineTransform handleTransform(Element imageElement, double x, double y, double srcWidth, double srcHeight, double dstWidth, double dstHeight, SVGGeneratorContext generatorContext)
Determines the transformation needed to get the cached image to scale & position properly. Sets x and y attributes on the element accordingly.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.