Class GradientFilter

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

    public class GradientFilter
    extends AbstractBufferedImageOp
    A filter which draws a coloured gradient. This is largely superceded by GradientPaint in Java1.2, but does provide a few more gradient options.
    • Constructor Detail

      • GradientFilter

        public GradientFilter()
      • GradientFilter

        public GradientFilter​(java.awt.Point p1,
                              java.awt.Point p2,
                              int color1,
                              int color2,
                              boolean repeat,
                              int type,
                              int interpolation)
    • Method Detail

      • setPoint1

        public void setPoint1​(java.awt.Point point1)
      • getPoint1

        public java.awt.Point getPoint1()
      • setPoint2

        public void setPoint2​(java.awt.Point point2)
      • getPoint2

        public java.awt.Point getPoint2()
      • setType

        public void setType​(int type)
      • getType

        public int getType()
      • setInterpolation

        public void setInterpolation​(int interpolation)
      • getInterpolation

        public int getInterpolation()
      • setAngle

        public void setAngle​(float angle)
        Specifies the angle of the texture.
        Parameters:
        angle - the angle of the texture.
        See Also:
        getAngle()
      • getAngle

        public float getAngle()
        Returns the angle of the texture.
        Returns:
        the angle of the texture.
        See Also:
        setAngle(float)
      • setColormap

        public void setColormap​(Colormap colormap)
        Set the colormap to be used for the filter.
        Parameters:
        colormap - the colormap
        See Also:
        getColormap()
      • setPaintMode

        public void setPaintMode​(int paintMode)
      • getPaintMode

        public int getPaintMode()
      • filter

        public java.awt.image.BufferedImage filter​(java.awt.image.BufferedImage src,
                                                   java.awt.image.BufferedImage dst)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object