Package com.jhlabs.image
Class TransformFilter
- java.lang.Object
-
- com.jhlabs.image.AbstractBufferedImageOp
-
- com.jhlabs.image.TransformFilter
-
- All Implemented Interfaces:
java.awt.image.BufferedImageOp,java.lang.Cloneable
- Direct Known Subclasses:
BlockFilter,CircleFilter,CurlFilter,DiffuseFilter,DisplaceFilter,FieldWarpFilter,KaleidoscopeFilter,MapFilter,MarbleFilter,OffsetFilter,PerspectiveFilter,PinchFilter,PolarFilter,RippleFilter,RotateFilter,ShearFilter,SphereFilter,SwimFilter,TwirlFilter,WaterFilter
public abstract class TransformFilter extends AbstractBufferedImageOp
An abstract superclass for filters which distort images in some way. The subclass only needs to override two methods to provide the mapping between source and destination pixels.
-
-
Field Summary
Fields Modifier and Type Field Description static intBILINEARstatic intCLAMPprotected intedgeActionprotected intinterpolationstatic intNEAREST_NEIGHBOURprotected java.awt.RectangleoriginalSpaceprotected java.awt.RectangletransformedSpacestatic intWRAPstatic intZERO
-
Constructor Summary
Constructors Constructor Description TransformFilter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImagefilter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)protected java.awt.image.BufferedImagefilterPixelsNN(java.awt.image.BufferedImage dst, int width, int height, int[] inPixels, java.awt.Rectangle transformedSpace)intgetEdgeAction()intgetInterpolation()voidsetEdgeAction(int edgeAction)voidsetInterpolation(int interpolation)protected abstract voidtransformInverse(int x, int y, float[] out)protected voidtransformSpace(java.awt.Rectangle rect)-
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
-
-
-
Field Detail
-
ZERO
public static final int ZERO
- See Also:
- Constant Field Values
-
CLAMP
public static final int CLAMP
- See Also:
- Constant Field Values
-
WRAP
public static final int WRAP
- See Also:
- Constant Field Values
-
NEAREST_NEIGHBOUR
public static final int NEAREST_NEIGHBOUR
- See Also:
- Constant Field Values
-
BILINEAR
public static final int BILINEAR
- See Also:
- Constant Field Values
-
edgeAction
protected int edgeAction
-
interpolation
protected int interpolation
-
transformedSpace
protected java.awt.Rectangle transformedSpace
-
originalSpace
protected java.awt.Rectangle originalSpace
-
-
Method Detail
-
setEdgeAction
public void setEdgeAction(int edgeAction)
-
getEdgeAction
public int getEdgeAction()
-
setInterpolation
public void setInterpolation(int interpolation)
-
getInterpolation
public int getInterpolation()
-
transformInverse
protected abstract void transformInverse(int x, int y, float[] out)
-
transformSpace
protected void transformSpace(java.awt.Rectangle rect)
-
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
-
filterPixelsNN
protected java.awt.image.BufferedImage filterPixelsNN(java.awt.image.BufferedImage dst, int width, int height, int[] inPixels, java.awt.Rectangle transformedSpace)
-
-