Package com.jhlabs.image
Class ShapeFilter
- java.lang.Object
-
- com.jhlabs.image.AbstractBufferedImageOp
-
- com.jhlabs.image.WholeImageFilter
-
- com.jhlabs.image.ShapeFilter
-
- All Implemented Interfaces:
java.awt.image.BufferedImageOp
,java.lang.Cloneable
public class ShapeFilter extends WholeImageFilter
-
-
Field Summary
Fields Modifier and Type Field Description static int
CIRCLE_DOWN
static int
CIRCLE_UP
protected Colormap
colormap
static int
LINEAR
static int
SMOOTH
-
Fields inherited from class com.jhlabs.image.WholeImageFilter
originalSpace, transformedSpace
-
-
Constructor Summary
Constructors Constructor Description ShapeFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
distanceMap(int[] map, int width, int height)
protected int[]
filterPixels(int width, int height, int[] inPixels, java.awt.Rectangle transformedSpace)
Actually filter the pixels.Colormap
getColormap()
Get the colormap to be used for the filter.float
getFactor()
boolean
getInvert()
boolean
getMerge()
int
getType()
boolean
getUseAlpha()
void
setColormap(Colormap colormap)
Set the colormap to be used for the filter.void
setFactor(float factor)
void
setInvert(boolean invert)
void
setMerge(boolean merge)
void
setType(int type)
void
setUseAlpha(boolean useAlpha)
java.lang.String
toString()
-
Methods inherited from class com.jhlabs.image.WholeImageFilter
filter, transformSpace
-
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB, stringToColor
-
-
-
-
Field Detail
-
LINEAR
public static final int LINEAR
- See Also:
- Constant Field Values
-
CIRCLE_UP
public static final int CIRCLE_UP
- See Also:
- Constant Field Values
-
CIRCLE_DOWN
public static final int CIRCLE_DOWN
- See Also:
- Constant Field Values
-
SMOOTH
public static final int SMOOTH
- See Also:
- Constant Field Values
-
colormap
protected Colormap colormap
-
-
Method Detail
-
setFactor
public void setFactor(float factor)
-
getFactor
public float getFactor()
-
setColormap
public void setColormap(Colormap colormap)
Set the colormap to be used for the filter.- Parameters:
colormap
- the colormap- See Also:
getColormap()
-
getColormap
public Colormap getColormap()
Get the colormap to be used for the filter.- Returns:
- the colormap
- See Also:
setColormap(com.jhlabs.image.Colormap)
-
setUseAlpha
public void setUseAlpha(boolean useAlpha)
-
getUseAlpha
public boolean getUseAlpha()
-
setType
public void setType(int type)
-
getType
public int getType()
-
setInvert
public void setInvert(boolean invert)
-
getInvert
public boolean getInvert()
-
setMerge
public void setMerge(boolean merge)
-
getMerge
public boolean getMerge()
-
filterPixels
protected int[] filterPixels(int width, int height, int[] inPixels, java.awt.Rectangle transformedSpace)
Description copied from class:WholeImageFilter
Actually filter the pixels.- Specified by:
filterPixels
in classWholeImageFilter
- Parameters:
width
- the image widthheight
- the image heightinPixels
- the image pixelstransformedSpace
- the output bounds- Returns:
- the output pixels
-
distanceMap
public int distanceMap(int[] map, int width, int height)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-