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