Class TextureFilter

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

    public class TextureFilter
    extends PointFilter
    • Field Detail

      • amount

        public float amount
      • turbulence

        public float turbulence
      • gain

        public float gain
      • bias

        public float bias
      • operation

        public int operation
    • Constructor Detail

      • TextureFilter

        public TextureFilter()
    • Method Detail

      • setAmount

        public void setAmount​(float amount)
        Set the amount of texture.
        Parameters:
        amount - the amount Minimum value: 0, maximum value: 1
        See Also:
        getAmount()
      • getAmount

        public float getAmount()
        Get the amount of texture.
        Returns:
        the amount
        See Also:
        setAmount(float)
      • setFunction

        public void setFunction​(Function2D function)
      • setOperation

        public void setOperation​(int operation)
      • getOperation

        public int getOperation()
      • setScale

        public void setScale​(float scale)
        Specifies the scale of the texture.
        Parameters:
        scale - the scale of the texture. Minimum value: 1, maximum value: 300+
        See Also:
        getScale()
      • getScale

        public float getScale()
        Returns the scale of the texture.
        Returns:
        the scale of the texture.
        See Also:
        setScale(float)
      • setStretch

        public void setStretch​(float stretch)
        Specifies the stretch factor of the texture.
        Parameters:
        stretch - the stretch factor of the texture. Minimum value: 1, maximum value: 50+
        See Also:
        getStretch()
      • getStretch

        public float getStretch()
        Returns the stretch factor of the texture.
        Returns:
        the stretch factor of the texture.
        See Also:
        setStretch(float)
      • 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)
      • setTurbulence

        public void setTurbulence​(float turbulence)
        Specifies the turbulence of the texture.
        Parameters:
        turbulence - the turbulence of the texture. Minimum value: 0, maximum value: 1
        See Also:
        getTurbulence()
      • getTurbulence

        public float getTurbulence()
        Returns the turbulence of the texture.
        Returns:
        the turbulence of the texture.
        See Also:
        setTurbulence(float)
      • setColormap

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

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

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