Package com.jhlabs.image
Class StampFilter
java.lang.Object
com.jhlabs.image.AbstractBufferedImageOp
com.jhlabs.image.PointFilter
com.jhlabs.image.StampFilter
- All Implemented Interfaces:
BufferedImageOp,Cloneable
A filter which produces a rubber-stamp type of effect by performing a thresholded blur.
-
Field Summary
Fields inherited from class com.jhlabs.image.PointFilter
canFilterIndexColorModel -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a StampFilter.StampFilter(float threshold) Construct a StampFilter. -
Method Summary
Modifier and TypeMethodDescriptionfilter(BufferedImage src, BufferedImage dst) intfilterRGB(int x, int y, int rgb) intgetBlack()Set the color to be used for pixels below the lower threshold.floatGet the radius of the effect.floatGet the softness of the effect.floatGet the threshold value.intgetWhite()Get the color to be used for pixels above the upper threshold.voidsetBlack(int black) Set the color to be used for pixels below the lower threshold.voidsetRadius(float radius) Set the radius of the effect.voidsetSoftness(float softness) Set the softness of the effect in the range 0..1.voidsetThreshold(float threshold) Set the threshold value.voidsetWhite(int white) Set the color to be used for pixels above the upper threshold.toString()Methods inherited from class com.jhlabs.image.PointFilter
setDimensionsMethods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
Constructor Details
-
StampFilter
public StampFilter()Construct a StampFilter. -
StampFilter
public StampFilter(float threshold) Construct a StampFilter.- Parameters:
threshold- the threshold value
-
-
Method Details
-
setRadius
public void setRadius(float radius) Set the radius of the effect.- Parameters:
radius- the radius- See Also:
-
getRadius
public float getRadius()Get the radius of the effect.- Returns:
- the radius
- See Also:
-
setThreshold
public void setThreshold(float threshold) Set the threshold value.- Parameters:
threshold- the threshold value- See Also:
-
getThreshold
public float getThreshold()Get the threshold value.- Returns:
- the threshold value
- See Also:
-
setSoftness
public void setSoftness(float softness) Set the softness of the effect in the range 0..1.- Parameters:
softness- the softness- See Also:
-
getSoftness
public float getSoftness()Get the softness of the effect.- Returns:
- the softness
- See Also:
-
setWhite
public void setWhite(int white) Set the color to be used for pixels above the upper threshold.- Parameters:
white- the color- See Also:
-
getWhite
public int getWhite()Get the color to be used for pixels above the upper threshold.- Returns:
- the color
- See Also:
-
setBlack
public void setBlack(int black) Set the color to be used for pixels below the lower threshold.- Parameters:
black- the color- See Also:
-
getBlack
public int getBlack()Set the color to be used for pixels below the lower threshold.- Returns:
- the color
- See Also:
-
filter
- Specified by:
filterin interfaceBufferedImageOp- Overrides:
filterin classPointFilter
-
filterRGB
public int filterRGB(int x, int y, int rgb) - Specified by:
filterRGBin classPointFilter
-
toString
-