Class ColourFilter

  • All Implemented Interfaces:
    java.awt.image.ImageConsumer, java.lang.Cloneable

    public class ColourFilter
    extends java.awt.image.RGBImageFilter
    Class to filter images by simply applying a boolean OR operation.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int BLUE_MASK
      The mask for selecting the blue bits.
      static int GREEN_MASK
      The mask for selecting the green bits.
      static int RED_GREEN_BLUE_MASK
      The mask for selecting the red, green, and blue bits.
      static int RED_MASK
      The mask for selecting the red bits.
      • Fields inherited from class java.awt.image.RGBImageFilter

        canFilterIndexColorModel, newmodel, origmodel
      • Fields inherited from class java.awt.image.ImageFilter

        consumer
      • Fields inherited from interface java.awt.image.ImageConsumer

        COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
    • 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 ColourFilter clone()  
      int filterRGB​(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
      • Methods inherited from class java.awt.image.ImageFilter

        getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setProperties
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Constructor Detail

      • ColourFilter

        public ColourFilter​(int mask)
        Creates a new instance.
        Parameters:
        mask - Mask to apply
    • Method Detail

      • filterRGB

        public int filterRGB​(int x,
                             int y,
                             int rgb)
        Converts a pixel by applying an or operation.
        Specified by:
        filterRGB in class java.awt.image.RGBImageFilter
      • clone

        @NotNull
        public @NotNull ColourFilter clone()
        Overrides:
        clone in class java.awt.image.ImageFilter