public class ColorFilter extends java.lang.Object implements Filter
A ColorFilter is a Filter that blends the RGB value of each pixel in the original image with that of a single Color that it uses. The alpha value of the ColorFilter's Color is proportional to the strength of its influence on the filtered image's RGB values. An alpha value of 0 has no effect, and an alpha value of 1 completely replaces the original image's RGB values, thus turning the filtered image into a colored silhouette. The alpha values of the original image's pixels are left unchanged in the filtered image.
Color
Constructor and Description |
---|
ColorFilter(Color color)
Constructs a ColorFilter that uses the specified Color.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Returns whether the specified object is a ColorFilter that is equal to
this ColorFilter.
|
Color |
getColor()
Returns the Color that this ColorFilter uses.
|
Image |
getFilteredImage(Image image)
Returns the transformation through this Filter of the specified
Celick
image.
|
int |
hashCode() |
public ColorFilter(Color color)
color
- The used Colorpublic final int hashCode()
hashCode
in class java.lang.Object
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to be compared with this ColorFilterpublic final Color getColor()
public final Image getFilteredImage(Image image)
Filter
getFilteredImage
in interface Filter
image
- The Image to be transformed