Package net.sf.gridarta.model.face
Class ColourFilter
- java.lang.Object
-
- java.awt.image.ImageFilter
-
- java.awt.image.RGBImageFilter
-
- net.sf.gridarta.model.face.ColourFilter
-
- All Implemented Interfaces:
java.awt.image.ImageConsumer,java.lang.Cloneable
public class ColourFilter extends java.awt.image.RGBImageFilterClass to filter images by simply applying a boolean OR operation.
-
-
Field Summary
Fields Modifier and Type Field Description static intBLUE_MASKThe mask for selecting the blue bits.static intGREEN_MASKThe mask for selecting the green bits.static intRED_GREEN_BLUE_MASKThe mask for selecting the red, green, and blue bits.static intRED_MASKThe mask for selecting the red bits.
-
Constructor Summary
Constructors Constructor Description ColourFilter(int mask)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ColourFilterclone()intfilterRGB(int x, int y, int rgb)Converts a pixel by applying an or operation.-
Methods inherited from class java.awt.image.RGBImageFilter
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModel
-
-
-
-
Field Detail
-
RED_MASK
public static final int RED_MASK
The mask for selecting the red bits.- See Also:
- Constant Field Values
-
GREEN_MASK
public static final int GREEN_MASK
The mask for selecting the green bits.- See Also:
- Constant Field Values
-
BLUE_MASK
public static final int BLUE_MASK
The mask for selecting the blue bits.- See Also:
- Constant Field Values
-
RED_GREEN_BLUE_MASK
public static final int RED_GREEN_BLUE_MASK
The mask for selecting the red, green, and blue bits.- See Also:
- Constant Field Values
-
-
Method Detail
-
filterRGB
public int filterRGB(int x, int y, int rgb)Converts a pixel by applying an or operation.- Specified by:
filterRGBin classjava.awt.image.RGBImageFilter
-
clone
@NotNull public @NotNull ColourFilter clone()
- Overrides:
clonein classjava.awt.image.ImageFilter
-
-