Package com.jhlabs.image
Class DissolveFilter
- java.lang.Object
-
- com.jhlabs.image.AbstractBufferedImageOp
-
- com.jhlabs.image.PointFilter
-
- com.jhlabs.image.DissolveFilter
-
- All Implemented Interfaces:
java.awt.image.BufferedImageOp
,java.lang.Cloneable
public class DissolveFilter extends PointFilter
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 Constructor Description DissolveFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImage
filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
int
filterRGB(int x, int y, int rgb)
float
getDensity()
Get the density of the image.float
getSoftness()
Get the softness of the dissolve.void
setDensity(float density)
Set the density of the image in the range 0..1.void
setSoftness(float softness)
Set the softness of the dissolve in the range 0..1.java.lang.String
toString()
-
Methods inherited from class com.jhlabs.image.PointFilter
setDimensions
-
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB, stringToColor
-
-
-
-
Method Detail
-
setDensity
public void setDensity(float density)
Set the density of the image in the range 0..1.- Parameters:
density
- the density, min-value 0, max-value 1- See Also:
getDensity()
-
getDensity
public float getDensity()
Get the density of the image.- Returns:
- the density
- See Also:
setDensity(float)
-
setSoftness
public void setSoftness(float softness)
Set the softness of the dissolve in the range 0..1.- Parameters:
softness
- the softness, min-value 0, max-value 1- See Also:
getSoftness()
-
getSoftness
public float getSoftness()
Get the softness of the dissolve.- Returns:
- the softness
- See Also:
setSoftness(float)
-
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
- Specified by:
filter
in interfacejava.awt.image.BufferedImageOp
- Overrides:
filter
in classPointFilter
-
filterRGB
public int filterRGB(int x, int y, int rgb)
- Specified by:
filterRGB
in classPointFilter
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-