static class BufferedImageDrawHelper.Convert3DColorsFilter
extends java.awt.image.RGBImageFilter
Modifier and Type | Field and Description |
---|---|
private static int |
COLOR_3D_BLACK
Original 3D black color(0, 0, 0).
|
private static int |
COLOR_3D_DK_GRAY
Original 3D dark gray color(128, 128, 128).
|
private static int |
COLOR_3D_LT_GRAY
Original 3D light gray color(192, 192, 192).
|
private static int |
COLOR_3D_WHITE
Original 3D white color(255, 255, 255).
|
(package private) int |
newBlack
New value for 3D black.
|
(package private) int |
newDkGray
New value for 3D dark gray.
|
(package private) int |
newLtGray
New value for 3D light gray.
|
(package private) int |
newWhite
New value for 3D white.
|
Constructor and Description |
---|
Convert3DColorsFilter(int white,
int ltGray,
int dkGray,
int black)
Creates new filter with the given 3D colors to replace.
|
Modifier and Type | Method and Description |
---|---|
int |
filterRGB(int x,
int y,
int pixel)
This is on the fly converter to change the 3D colors with one we passed on the filter
construction.
|
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModel
private static final int COLOR_3D_WHITE
private static final int COLOR_3D_LT_GRAY
private static final int COLOR_3D_DK_GRAY
private static final int COLOR_3D_BLACK
int newWhite
int newLtGray
int newDkGray
int newBlack
Convert3DColorsFilter(int white, int ltGray, int dkGray, int black)
white
- The new value for white color.ltGray
- The new value for light gray color.dkGray
- The new value for dark gray color.black
- The new value for dark gray color.public int filterRGB(int x, int y, int pixel)
filterRGB
in class java.awt.image.RGBImageFilter
x
- The X pixel coordinate.y
- The Y pixel coordinate.pixel
- The ARGB pixel value of the original image.