org.apache.batik.refimpl.gvt.filter
Class DisplacementMapOp

java.lang.Object
  |
  +--org.apache.batik.refimpl.gvt.filter.DisplacementMapOp
All Implemented Interfaces:
java.awt.image.BufferedImageOp, java.awt.image.RasterOp

public class DisplacementMapOp
extends java.lang.Object
implements java.awt.image.BufferedImageOp, java.awt.image.RasterOp

This class provides an implementation for the SVG feDisplacementMap filter, as defined in Chapter 15, section 15 of the SVG specification.


Constructor Summary
DisplacementMapOp(ARGBChannel xChannel, ARGBChannel yChannel, int scaleX, int scaleY, java.awt.image.BufferedImage in2)
           
 
Method Summary
 java.awt.image.BufferedImage createCompatibleDestImage(java.awt.image.BufferedImage src, java.awt.image.ColorModel destCM)
           
 java.awt.image.WritableRaster createCompatibleDestRaster(java.awt.image.Raster src)
           
 java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dest)
           
 java.awt.image.WritableRaster filter(java.awt.image.Raster src, java.awt.image.WritableRaster dest)
           
 java.awt.geom.Rectangle2D getBounds2D(java.awt.image.BufferedImage src)
           
 java.awt.geom.Rectangle2D getBounds2D(java.awt.image.Raster src)
           
 java.awt.geom.Point2D getPoint2D(java.awt.geom.Point2D srcPt, java.awt.geom.Point2D destPt)
           
 java.awt.RenderingHints getRenderingHints()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisplacementMapOp

public DisplacementMapOp(ARGBChannel xChannel,
                         ARGBChannel yChannel,
                         int scaleX,
                         int scaleY,
                         java.awt.image.BufferedImage in2)
Parameters:
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
xChannel - defines the channel of in2 whose values will be on X-axis operation
xChannel - defines the channel of in2 whose values will be on X-axis operation
in2 - defines the input bufferedImage whose component values will be used in displacment operation
Method Detail

getBounds2D

public java.awt.geom.Rectangle2D getBounds2D(java.awt.image.Raster src)
Specified by:
getBounds2D in interface java.awt.image.RasterOp

getBounds2D

public java.awt.geom.Rectangle2D getBounds2D(java.awt.image.BufferedImage src)
Specified by:
getBounds2D in interface java.awt.image.BufferedImageOp

getPoint2D

public java.awt.geom.Point2D getPoint2D(java.awt.geom.Point2D srcPt,
                                        java.awt.geom.Point2D destPt)
Specified by:
getPoint2D in interface java.awt.image.BufferedImageOp

getRenderingHints

public java.awt.RenderingHints getRenderingHints()
Specified by:
getRenderingHints in interface java.awt.image.BufferedImageOp

createCompatibleDestRaster

public java.awt.image.WritableRaster createCompatibleDestRaster(java.awt.image.Raster src)
Specified by:
createCompatibleDestRaster in interface java.awt.image.RasterOp

createCompatibleDestImage

public java.awt.image.BufferedImage createCompatibleDestImage(java.awt.image.BufferedImage src,
                                                              java.awt.image.ColorModel destCM)
Specified by:
createCompatibleDestImage in interface java.awt.image.BufferedImageOp

filter

public java.awt.image.WritableRaster filter(java.awt.image.Raster src,
                                            java.awt.image.WritableRaster dest)
Specified by:
filter in interface java.awt.image.RasterOp
Parameters:
src - the Raster to be filtered
dest - stores the filtered image. If null, a destination will be created. src and dest can refer to the same Raster, in which situation the src will be modified.

filter

public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src,
                                           java.awt.image.BufferedImage dest)
Specified by:
filter in interface java.awt.image.BufferedImageOp


Copyright © 2000 Apache Software Foundation. All Rights Reserved.