Package com.jhlabs.image
Class HalftoneFilter
java.lang.Object
com.jhlabs.image.AbstractBufferedImageOp
com.jhlabs.image.HalftoneFilter
- All Implemented Interfaces:
BufferedImageOp
,Cloneable
A filter which uses a another image as a ask to produce a halftoning effect.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilter
(BufferedImage src, BufferedImage dst) boolean
getMask()
Get the halftone mask.boolean
Get whether to do monochrome halftoning.float
Get the softness of the effect.void
setInvert
(boolean invert) void
setMask
(BufferedImage mask) Set the halftone mask.void
setMonochrome
(boolean monochrome) Set whether to do monochrome halftoning.void
setSoftness
(float softness) Set the softness of the effect in the range 0..1.toString()
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
Constructor Details
-
HalftoneFilter
public HalftoneFilter()
-
-
Method Details
-
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:
-
setMask
Set the halftone mask.- Parameters:
mask
- the mask- See Also:
-
getMask
Get the halftone mask.- Returns:
- the mask
- See Also:
-
setInvert
public void setInvert(boolean invert) -
getInvert
public boolean getInvert() -
setMonochrome
public void setMonochrome(boolean monochrome) Set whether to do monochrome halftoning.- Parameters:
monochrome
- true for monochrome halftoning- See Also:
-
getMonochrome
public boolean getMonochrome()Get whether to do monochrome halftoning.- Returns:
- true for monochrome halftoning
- See Also:
-
filter
-
toString
-