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

Class DisplacementMapRable8Bit

public class DisplacementMapRable8Bit extends AbstractColorInterpolationRable implements DisplacementMapRable

Implements a DisplacementMap operation, which takes pixel values from another image to spatially displace the input image
Constructor Summary
DisplacementMapRable8Bit(List sources, double scale, ARGBChannel xChannelSelector, ARGBChannel yChannelSelector)
Method Summary
RenderedImagecreateRendering(RenderContext rc)
Rectangle2DgetBounds2D()
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.
doublegetScale()
Returns the displacement scale factor
ARGBChannelgetXChannelSelector()
Returns the xChannelSelector
ARGBChannelgetYChannelSelector()
Returns the yChannelSelector
voidsetScale(double scale)
The displacement scale factor
voidsetSources(List sources)
Sets this filter sources.
voidsetXChannelSelector(ARGBChannel xChannelSelector)
Select which component values will be used for displacement along the X axis
voidsetYChannelSelector(ARGBChannel yChannelSelector)
Select which component values will be used for displacement along the Y axis

Constructor Detail

DisplacementMapRable8Bit

public DisplacementMapRable8Bit(List sources, double scale, ARGBChannel xChannelSelector, ARGBChannel yChannelSelector)

Method Detail

createRendering

public RenderedImage createRendering(RenderContext rc)

getBounds2D

public Rectangle2D getBounds2D()

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.

getScale

public double getScale()
Returns the displacement scale factor

getXChannelSelector

public ARGBChannel getXChannelSelector()
Returns the xChannelSelector

getYChannelSelector

public ARGBChannel getYChannelSelector()
Returns the yChannelSelector

setScale

public void setScale(double scale)
The displacement scale factor

Parameters: scale can be any number.

setSources

public void setSources(List sources)
Sets this filter sources.

setXChannelSelector

public void setXChannelSelector(ARGBChannel xChannelSelector)
Select which component values will be used for displacement along the X axis

Parameters: xChannelSelector value is among R, G, B and A.

setYChannelSelector

public void setYChannelSelector(ARGBChannel yChannelSelector)
Select which component values will be used for displacement along the Y axis

Parameters: yChannelSelector value is among R, G, B and A.

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