Class TintFilter

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

    public class TintFilter
    extends java.awt.image.RGBImageFilter
    An image filter that tints the image with a color.
    • Field Summary

      • 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
      TintFilter​(java.awt.Color color, int width, int height, java.awt.Insets insets)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.Image createTintedImage​(java.awt.Image i, java.awt.Color color, java.awt.Insets insets)
      Creates a tinted image
      int filterRGB​(int x, int y, int rgb)  
      • Methods inherited from class java.awt.image.RGBImageFilter

        filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModel
      • Methods inherited from class java.awt.image.ImageFilter

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

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TintFilter

        public TintFilter​(java.awt.Color color,
                          int width,
                          int height,
                          java.awt.Insets insets)
    • Method Detail

      • filterRGB

        public int filterRGB​(int x,
                             int y,
                             int rgb)
        Specified by:
        filterRGB in class java.awt.image.RGBImageFilter
      • createTintedImage

        public static java.awt.Image createTintedImage​(java.awt.Image i,
                                                       java.awt.Color color,
                                                       java.awt.Insets insets)
        Creates a tinted image
        Parameters:
        i - the original image
        color - the color to be tinted
        insets - the insets. The border area with the insets will not be tinted.
        Returns:
        a tinted image