com.jhlabs.image
Class HalftoneFilter

java.lang.Object
  extended by com.jhlabs.image.AbstractBufferedImageOp
      extended by 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
HalftoneFilter()
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HalftoneFilter

public HalftoneFilter()
Method Detail

setSoftness

public void setSoftness(float softness)
Set the softness of the effect in the range 0..1.

Parameters:
softness - the softness
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(java.awt.image.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 class java.lang.Object