org.apache.batik.ext.awt.image.rendered

Class DisplacementMapRed

public class DisplacementMapRed extends AbstractRed

This implementation of RenderableImage will render its input GraphicsNode on demand for tiles.
Constructor Summary
DisplacementMapRed(CachableRed image, CachableRed offsets, ARGBChannel xChannel, ARGBChannel yChannel, float scaleX, float scaleY, RenderingHints rh)
Method Summary
WritableRastercopyData(WritableRaster wr)
voidfilterBL(Raster off, WritableRaster dst, int[] xTile, int[] xOff, int[] yTile, int[] yOff)
voidfilterBLPre(Raster off, WritableRaster dst, int[] xTile, int[] xOff, int[] yTile, int[] yOff)
voidfilterNN(Raster off, WritableRaster dst, int[] xTile, int[] xOff, int[] yTile, int[] yOff)
Does displacement map using Nearest neighbor interpolation
RastergetTile(int tileX, int tileY)
DisplacementMapRed.TileOffsetsgetXOffsets(int xTile)
DisplacementMapRed.TileOffsetsgetYOffsets(int yTile)

Constructor Detail

DisplacementMapRed

public DisplacementMapRed(CachableRed image, CachableRed offsets, ARGBChannel xChannel, ARGBChannel yChannel, float scaleX, float scaleY, RenderingHints rh)

Parameters: image the image to distort offsets the displacement map xChannel defines the channel of off whose values will be on X-axis operation yChannel defines the channel of off whose values will be scaleX defines the scale factor of the filter operation on the X axis. scaleY defines the scale factor of the filter operation on the Y axis rh the rendering hints

Method Detail

copyData

public WritableRaster copyData(WritableRaster wr)

filterBL

public void filterBL(Raster off, WritableRaster dst, int[] xTile, int[] xOff, int[] yTile, int[] yOff)

filterBLPre

public void filterBLPre(Raster off, WritableRaster dst, int[] xTile, int[] xOff, int[] yTile, int[] yOff)

filterNN

public void filterNN(Raster off, WritableRaster dst, int[] xTile, int[] xOff, int[] yTile, int[] yOff)
Does displacement map using Nearest neighbor interpolation

Parameters: off the displacement map dst stores the filtered image. If null, a destination will be created. img and dst can refer to the same Raster, in which situation the img will be modified.

getTile

public Raster getTile(int tileX, int tileY)

getXOffsets

public DisplacementMapRed.TileOffsets getXOffsets(int xTile)

getYOffsets

public DisplacementMapRed.TileOffsets getYOffsets(int yTile)
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.