j2d.filters
Class DiffusionFilter
java.lang.Object
j2d.filters.AbstractBufferedImageOp
j2d.filters.WholeImageFilter
j2d.filters.DiffusionFilter
- All Implemented Interfaces:
- ImageProcessorInterface, java.awt.image.BufferedImageOp, java.io.Serializable, java.lang.Cloneable
public class DiffusionFilter
- extends WholeImageFilter
A filter which uses Floyd-Steinberg error diffusion dithering to halftone an image.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
levels
public int levels
DiffusionFilter
public DiffusionFilter()
- Construct a DiffusionFilter
setSerpentine
public void setSerpentine(boolean serpentine)
- Set whether to use a serpentine pattern for return or not. This can reduce 'avalanche' artifacts in the output.
- Parameters:
serpentine
- true to use serpentine pattern
getSerpentine
public boolean getSerpentine()
- Return the serpentine setting
- Returns:
- the current setting
setColorDither
public void setColorDither(boolean colorDither)
getColorDither
public boolean getColorDither()
setMatrix
public void setMatrix(int[] matrix)
getMatrix
public int[] getMatrix()
setLevels
public void setLevels(int levels)
getLevels
public int getLevels()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object