public class DiffusionFilter extends WholeImageFilter
Modifier and Type | Field and Description |
---|---|
private boolean |
colorDither |
private static int[] |
diffusionMatrix |
private int |
levels |
private int[] |
matrix |
private boolean |
serpentine |
private int |
sum |
originalSpace, transformedSpace
Constructor and Description |
---|
DiffusionFilter()
Construct a DiffusionFilter.
|
Modifier and Type | Method and Description |
---|---|
protected int[] |
filterPixels(int width,
int height,
int[] inPixels,
Rectangle transformedSpace)
Actually filter the pixels.
|
boolean |
getColorDither()
Get whether to use a color dither.
|
int |
getLevels()
Get the number of dither levels.
|
int[] |
getMatrix()
Get the dither matrix.
|
boolean |
getSerpentine()
Return the serpentine setting.
|
void |
setColorDither(boolean colorDither)
Set whether to use a color dither.
|
void |
setLevels(int levels)
Set the number of dither levels.
|
void |
setMatrix(int[] matrix)
Set the dither matrix.
|
void |
setSerpentine(boolean serpentine)
Set whether to use a serpentine pattern for return or not.
|
String |
toString() |
filter, transformSpace
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
private static final int[] diffusionMatrix
private int[] matrix
private int sum
private boolean serpentine
private boolean colorDither
private int levels
public DiffusionFilter()
public void setSerpentine(boolean serpentine)
serpentine
- true to use serpentine patterngetSerpentine()
public boolean getSerpentine()
setSerpentine(boolean)
public void setColorDither(boolean colorDither)
colorDither
- true to use a color dithergetColorDither()
public boolean getColorDither()
setColorDither(boolean)
public void setMatrix(int[] matrix)
matrix
- the dither matrixgetMatrix()
public int[] getMatrix()
setMatrix(int[])
public void setLevels(int levels)
levels
- the number of levelsgetLevels()
public int getLevels()
setLevels(int)
protected int[] filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace)
WholeImageFilter
filterPixels
in class WholeImageFilter
width
- the image widthheight
- the image heightinPixels
- the image pixelstransformedSpace
- the output boundsWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses