public class ColorFilter extends Filter
A ColorFilter is a Filter that replaces the RGB value of every pixel in the original image with that of the one Color that it uses, thus turning the filtered image into a colored silhouette. The alpha value of the ColorFilter's Color is irrelevant to its behavior, and the alpha values of the original image's pixels are left unchanged in the filtered image.
Constructor and Description |
---|
ColorFilter(org.newdawn.slick.Color color)
Creates a new ColorFilter that uses the specified Color.
|
ColorFilter(int colorR,
int colorG,
int colorB)
Creates a new ColorFilter that uses a Color with the specified RGB value
and an alpha value of 255.
|
Modifier and Type | Method and Description |
---|---|
org.newdawn.slick.Color |
getColor()
Returns the Color that this ColorFilter uses.
|
public ColorFilter(org.newdawn.slick.Color color)
color
- The used Colorpublic ColorFilter(int colorR, int colorG, int colorB)
colorR
- The R value (0-255) of the used ColorcolorG
- The G value (0-255) of the used ColorcolorB
- The B value (0-255) of the used Color