org.apache.batik.ext.awt.image.renderable

Interface Filter

public interface Filter extends RenderableImage

This is an extension of RenderableImage that adds some needed functionality for tracking dirty regions and determining image dependancies.
Method Summary
Rectangle2DgetBounds2D()
Returns the bounds of the current image.
ShapegetDependencyRegion(int srcIndex, Rectangle2D outputRgn)
Returns the region of input data is is required to generate outputRgn.
ShapegetDirtyRegion(int srcIndex, Rectangle2D inputRgn)
This calculates the region of output that is affected by a change in a region of input.
longgetTimeStamp()
Returns the current modification timestamp on this Renderable node.

Method Detail

getBounds2D

public Rectangle2D getBounds2D()
Returns the bounds of the current image. This should be 'in sync' with getMinX, getMinY, getWidth, getHeight

getDependencyRegion

public Shape getDependencyRegion(int srcIndex, Rectangle2D outputRgn)
Returns the region of input data is is required to generate outputRgn.

Parameters: srcIndex The source to do the dependency calculation for. outputRgn The region of output you are interested in generating dependencies for. The is given in the user coordiate system for this node.

Returns: The region of input required. This is in the user coordinate system for the source indicated by srcIndex.

getDirtyRegion

public Shape getDirtyRegion(int srcIndex, Rectangle2D inputRgn)
This calculates the region of output that is affected by a change in a region of input.

Parameters: srcIndex The input that inputRgn reflects changes in. inputRgn the region of input that has changed, used to calculate the returned shape. This is given in the user coordinate system of the source indicated by srcIndex.

Returns: The region of output that would be invalid given a change to inputRgn of the source selected by srcIndex. this is in the user coordinate system of this node.

getTimeStamp

public long getTimeStamp()
Returns the current modification timestamp on this Renderable node. This value will change whenever cached output data becomes invalid.

Returns: Current modification timestamp value.

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