Package com.jhlabs.image
Class ShapeFilter
java.lang.Object
com.jhlabs.image.AbstractBufferedImageOp
com.jhlabs.image.WholeImageFilter
com.jhlabs.image.ShapeFilter
- All Implemented Interfaces:
BufferedImageOp,Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intprotected Colormapstatic final intstatic final intFields inherited from class com.jhlabs.image.WholeImageFilter
originalSpace, transformedSpace -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdistanceMap(int[] map, int width, int height) protected int[]filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace) Actually filter the pixels.Get the colormap to be used for the filter.floatbooleanbooleangetMerge()intgetType()booleanvoidsetColormap(Colormap colormap) Set the colormap to be used for the filter.voidsetFactor(float factor) voidsetInvert(boolean invert) voidsetMerge(boolean merge) voidsetType(int type) voidsetUseAlpha(boolean useAlpha) toString()Methods inherited from class com.jhlabs.image.WholeImageFilter
filter, transformSpaceMethods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
Field Details
-
LINEAR
public static final int LINEAR- See Also:
-
CIRCLE_UP
public static final int CIRCLE_UP- See Also:
-
CIRCLE_DOWN
public static final int CIRCLE_DOWN- See Also:
-
SMOOTH
public static final int SMOOTH- See Also:
-
colormap
-
-
Constructor Details
-
ShapeFilter
public ShapeFilter()
-
-
Method Details
-
setFactor
public void setFactor(float factor) -
getFactor
public float getFactor() -
setColormap
Set the colormap to be used for the filter.- Parameters:
colormap- the colormap- See Also:
-
getColormap
Get the colormap to be used for the filter.- Returns:
- the colormap
- See Also:
-
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
Description copied from class:WholeImageFilterActually filter the pixels.- Specified by:
filterPixelsin 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
-