Class FillFilter

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

    public class FillFilter
    extends PointFilter
    A filter which fills an image with a given color. Normally you would just call Graphics.fillRect but it can sometimes be useful to go via a filter to fit in with an existing API.
    • Constructor Detail

      • FillFilter

        public FillFilter()
        Construct a FillFilter.
      • FillFilter

        public FillFilter​(int color)
        Construct a FillFilter.
        Parameters:
        color - the fill color
    • Method Detail

      • setFillColor

        public void setFillColor​(int fillColor)
        Set the fill color.
        Parameters:
        fillColor - the fill color
        See Also:
        getFillColor()
      • getFillColor

        public int getFillColor()
        Get the fill color.
        Returns:
        the fill color
        See Also:
        setFillColor(int)
      • filterRGB

        public int filterRGB​(int x,
                             int y,
                             int rgb)
        Specified by:
        filterRGB in class PointFilter