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

java.lang.Object
  |
  +--org.apache.batik.ext.awt.image.rendered.DisplacementMapOp
All Implemented Interfaces:
java.awt.image.RasterOp

public class DisplacementMapOp
extends java.lang.Object
implements 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.Raster in2)
           
 
Method Summary
 java.awt.image.WritableRaster createCompatibleDestRaster(java.awt.image.Raster src)
           
 java.awt.image.WritableRaster filter(java.awt.image.Raster src, java.awt.image.WritableRaster dest)
           
 java.awt.image.WritableRaster filterBL(java.awt.image.Raster src, java.awt.image.WritableRaster dest)
           
 java.awt.image.WritableRaster filterNN(java.awt.image.Raster src, java.awt.image.WritableRaster dest)
          Does displacement map using Nearest neighbor interpolation
 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.Raster 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

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.RasterOp

getRenderingHints

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

createCompatibleDestRaster

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

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.

filterBL

public java.awt.image.WritableRaster filterBL(java.awt.image.Raster src,
                                              java.awt.image.WritableRaster dest)

filterNN

public java.awt.image.WritableRaster filterNN(java.awt.image.Raster src,
                                              java.awt.image.WritableRaster dest)
Does displacement map using Nearest neighbor interpolation
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.


Copyright © 2001 Apache Software Foundation. All Rights Reserved.