类 RippleFilter

  • 所有已实现的接口:
    BufferedImageOp, Cloneable

    public class RippleFilter
    extends TransformFilter
    A filter which distorts an image by rippling it in the X or Y directions. The amplitude and wavelength of rippling can be specified as well as whether pixels going off the edges are wrapped or not.
    • 字段详细资料

      • SINE

        public static final int SINE
        Sine wave ripples.
        另请参阅:
        常量字段值
      • SAWTOOTH

        public static final int SAWTOOTH
        Sawtooth wave ripples.
        另请参阅:
        常量字段值
      • TRIANGLE

        public static final int TRIANGLE
        Triangle wave ripples.
        另请参阅:
        常量字段值
      • NOISE

        public static final int NOISE
        Noise ripples.
        另请参阅:
        常量字段值
    • 构造器详细资料

      • RippleFilter

        public RippleFilter()
        Construct a RippleFilter.
    • 方法详细资料

      • setXAmplitude

        public void setXAmplitude​(float xAmplitude)
        Set the amplitude of ripple in the X direction.
        参数:
        xAmplitude - the amplitude (in pixels).
        另请参阅:
        getXAmplitude()
      • getXAmplitude

        public float getXAmplitude()
        Get the amplitude of ripple in the X direction.
        返回:
        the amplitude (in pixels).
        另请参阅:
        setXAmplitude(float)
      • setXWavelength

        public void setXWavelength​(float xWavelength)
        Set the wavelength of ripple in the X direction.
        参数:
        xWavelength - the wavelength (in pixels).
        另请参阅:
        getXWavelength()
      • getXWavelength

        public float getXWavelength()
        Get the wavelength of ripple in the X direction.
        返回:
        the wavelength (in pixels).
        另请参阅:
        setXWavelength(float)
      • setYAmplitude

        public void setYAmplitude​(float yAmplitude)
        Set the amplitude of ripple in the Y direction.
        参数:
        yAmplitude - the amplitude (in pixels).
        另请参阅:
        getYAmplitude()
      • getYAmplitude

        public float getYAmplitude()
        Get the amplitude of ripple in the Y direction.
        返回:
        the amplitude (in pixels).
        另请参阅:
        setYAmplitude(float)
      • setYWavelength

        public void setYWavelength​(float yWavelength)
        Set the wavelength of ripple in the Y direction.
        参数:
        yWavelength - the wavelength (in pixels).
        另请参阅:
        getYWavelength()
      • getYWavelength

        public float getYWavelength()
        Get the wavelength of ripple in the Y direction.
        返回:
        the wavelength (in pixels).
        另请参阅:
        setYWavelength(float)
      • setWaveType

        public void setWaveType​(int waveType)
        Set the wave type.
        参数:
        waveType - the type.
        另请参阅:
        getWaveType()
      • getWaveType

        public int getWaveType()
        Get the wave type.
        返回:
        the type.
        另请参阅:
        setWaveType(int)
      • transformSpace

        protected void transformSpace​(Rectangle r)
        从类复制的说明: TransformFilter
        Forward transform a rectangle. Used to determine the size of the output image.
        覆盖:
        transformSpace 在类中 TransformFilter
        参数:
        r - the rectangle to transform
      • transformInverse

        protected void transformInverse​(int x,
                                        int y,
                                        float[] out)
        从类复制的说明: TransformFilter
        Inverse transform a point. This method needs to be overriden by all subclasses.
        指定者:
        transformInverse 在类中 TransformFilter
        参数:
        x - the X position of the pixel in the output image
        y - the Y position of the pixel in the output image
        out - the position of the pixel in the input image