org.apache.batik.svggen

Interface ExtensionHandler

public interface ExtensionHandler

The ExtensionHandler interface allows the user to handle Java 2D API extensions that map to SVG concepts (such as custom Paints, Composites or BufferedImageOp filters).
Method Summary
SVGCompositeDescriptorhandleComposite(Composite composite, SVGGeneratorContext generatorContext)
SVGFilterDescriptorhandleFilter(BufferedImageOp filter, Rectangle filterRect, SVGGeneratorContext generatorContext)
SVGPaintDescriptorhandlePaint(Paint paint, SVGGeneratorContext generatorContext)

Method Detail

handleComposite

public SVGCompositeDescriptor handleComposite(Composite composite, SVGGeneratorContext generatorContext)

Parameters: composite Custom Composite to be converted to SVG. generatorContext allows the handler to build DOM objects as needed.

Returns: an SVGCompositeDescriptor which contains a valid SVG filter, or null if the composite cannot be handled

handleFilter

public SVGFilterDescriptor handleFilter(BufferedImageOp filter, Rectangle filterRect, SVGGeneratorContext generatorContext)

Parameters: filter Custom filter to be converted to SVG. filterRect Rectangle, in device space, that defines the area to which filtering applies. May be null, meaning that the area is undefined. generatorContext allows the handler to build DOM objects as needed.

Returns: an SVGFilterDescriptor which contains a valid SVG filter, or null if the composite cannot be handled

handlePaint

public SVGPaintDescriptor handlePaint(Paint paint, SVGGeneratorContext generatorContext)

Parameters: paint Custom Paint to be converted to SVG generatorContext allows the handler to build DOM objects as needed.

Returns: an SVGPaintDescriptor

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.