public class DitherFilter extends PointFilter
Modifier and Type | Field and Description |
---|---|
private boolean |
colorDither |
private int |
cols |
static int[] |
dither90Halftone6x6Matrix
6x6 90 degree halftone.
|
static int[] |
ditherCluster3Matrix
Order-3 clustered dither.
|
static int[] |
ditherCluster4Matrix
Order-4 clustered dither.
|
static int[] |
ditherCluster8Matrix
Order-8 clustered dither.
|
static int[] |
ditherLines4x4Matrix
4x4 lines.
|
protected static int[] |
ditherMagic2x2Matrix
2x2 magic square.
|
protected static int[] |
ditherMagic4x4Matrix
4x4 magic square.
|
static int[] |
ditherOrdered4x4Matrix
4x4 ordered dither.
|
static int[] |
ditherOrdered6x6Matrix
Order-6 ordered dither.
|
static int[] |
ditherOrdered8x8Matrix
Order-8 ordered dither.
|
private int[] |
div |
private boolean |
initialized |
private int |
levels |
private int[] |
map |
private int[] |
matrix |
private int[] |
mod |
private int |
rows |
canFilterIndexColorModel
Constructor and Description |
---|
DitherFilter()
Constuct a DitherFilter.
|
Modifier and Type | Method and Description |
---|---|
int |
filterRGB(int x,
int y,
int rgb) |
boolean |
getColorDither()
Get whether to use a color dither.
|
int |
getLevels()
Get the number of dither levels.
|
int[] |
getMatrix()
Get the dither matrix.
|
protected void |
initialize()
Initialize the filter.
|
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.
|
String |
toString() |
filter, setDimensions
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
protected static final int[] ditherMagic2x2Matrix
protected static final int[] ditherMagic4x4Matrix
public static final int[] ditherOrdered4x4Matrix
public static final int[] ditherLines4x4Matrix
public static final int[] dither90Halftone6x6Matrix
public static final int[] ditherOrdered6x6Matrix
public static final int[] ditherOrdered8x8Matrix
public static final int[] ditherCluster3Matrix
public static final int[] ditherCluster4Matrix
public static final int[] ditherCluster8Matrix
private int[] matrix
private int rows
private int cols
private int levels
private int[] mod
private int[] div
private int[] map
private boolean colorDither
private boolean initialized
public DitherFilter()
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)
public void setColorDither(boolean colorDither)
colorDither
- whether to use a color dithergetColorDither()
public boolean getColorDither()
getColorDither()
protected void initialize()
public int filterRGB(int x, int y, int rgb)
filterRGB
in class PointFilter
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses