Package com.jhlabs.image
Class DissolveFilter
java.lang.Object
com.jhlabs.image.AbstractBufferedImageOp
com.jhlabs.image.PointFilter
com.jhlabs.image.DissolveFilter
- All Implemented Interfaces:
BufferedImageOp,Cloneable
A filter which "dissolves" an image by thresholding the alpha channel with random numbers.
-
Field Summary
Fields inherited from class com.jhlabs.image.PointFilter
canFilterIndexColorModel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilter(BufferedImage src, BufferedImage dst) intfilterRGB(int x, int y, int rgb) floatGet the density of the image.floatGet the softness of the dissolve.voidsetDensity(float density) Set the density of the image in the range 0..1.voidsetSoftness(float softness) Set the softness of the dissolve in the range 0..1.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
-
DissolveFilter
public DissolveFilter()
-
-
Method Details
-
setDensity
public void setDensity(float density) Set the density of the image in the range 0..1.- Parameters:
density- the density- See Also:
-
getDensity
public float getDensity()Get the density of the image.- Returns:
- the density
- See Also:
-
setSoftness
public void setSoftness(float softness) Set the softness of the dissolve in the range 0..1.- Parameters:
softness- the softness- See Also:
-
getSoftness
public float getSoftness()Get the softness of the dissolve.- Returns:
- the softness
- 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
-