railo.runtime.img.filter
Class RippleFilter

java.lang.Object
  extended by railo.runtime.img.filter.AbstractBufferedImageOp
      extended by railo.runtime.img.filter.TransformFilter
          extended by railo.runtime.img.filter.RippleFilter
All Implemented Interfaces:
BufferedImageOp, Cloneable, DynFiltering

public class RippleFilter
extends TransformFilter
implements DynFiltering

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.


Field Summary
static int NOISE
          Noise ripples.
static int SAWTOOTH
          Sawtooth wave ripples.
static int SINE
          Sine wave ripples.
static int TRIANGLE
          Triangle wave ripples.
 
Fields inherited from class railo.runtime.img.filter.TransformFilter
BILINEAR, NEAREST_NEIGHBOUR
 
Constructor Summary
RippleFilter()
          Construct a RippleFilter.
 
Method Summary
 BufferedImage filter(BufferedImage src, Struct parameters)
           
 int getWaveType()
          Get the wave type.
 float getXAmplitude()
          Get the amplitude of ripple in the X direction.
 float getXWavelength()
          Get the wavelength of ripple in the X direction.
 float getYAmplitude()
          Get the amplitude of ripple in the Y direction.
 float getYWavelength()
          Get the wavelength of ripple in the Y direction.
 void setWaveType(String waveType)
          Set the wave type.
 void setXAmplitude(float xAmplitude)
          Set the amplitude of ripple in the X direction.
 void setXWavelength(float xWavelength)
          Set the wavelength of ripple in the X direction.
 void setYAmplitude(float yAmplitude)
          Set the amplitude of ripple in the Y direction.
 void setYWavelength(float yWavelength)
          Set the wavelength of ripple in the Y direction.
 String toString()
           
 
Methods inherited from class railo.runtime.img.filter.TransformFilter
filter, getEdgeAction, getInterpolation, setEdgeAction, setInterpolation
 
Methods inherited from class railo.runtime.img.filter.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SINE

public static final int SINE
Sine wave ripples.

See Also:
Constant Field Values

SAWTOOTH

public static final int SAWTOOTH
Sawtooth wave ripples.

See Also:
Constant Field Values

TRIANGLE

public static final int TRIANGLE
Triangle wave ripples.

See Also:
Constant Field Values

NOISE

public static final int NOISE
Noise ripples.

See Also:
Constant Field Values
Constructor Detail

RippleFilter

public RippleFilter()
Construct a RippleFilter.

Method Detail

setXAmplitude

public void setXAmplitude(float xAmplitude)
Set the amplitude of ripple in the X direction.

Parameters:
xAmplitude - the amplitude (in pixels).
See Also:
getXAmplitude()

getXAmplitude

public float getXAmplitude()
Get the amplitude of ripple in the X direction.

Returns:
the amplitude (in pixels).
See Also:
setXAmplitude(float)

setXWavelength

public void setXWavelength(float xWavelength)
Set the wavelength of ripple in the X direction.

Parameters:
xWavelength - the wavelength (in pixels).
See Also:
getXWavelength()

getXWavelength

public float getXWavelength()
Get the wavelength of ripple in the X direction.

Returns:
the wavelength (in pixels).
See Also:
setXWavelength(float)

setYAmplitude

public void setYAmplitude(float yAmplitude)
Set the amplitude of ripple in the Y direction.

Parameters:
yAmplitude - the amplitude (in pixels).
See Also:
getYAmplitude()

getYAmplitude

public float getYAmplitude()
Get the amplitude of ripple in the Y direction.

Returns:
the amplitude (in pixels).
See Also:
setYAmplitude(float)

setYWavelength

public void setYWavelength(float yWavelength)
Set the wavelength of ripple in the Y direction.

Parameters:
yWavelength - the wavelength (in pixels).
See Also:
getYWavelength()

getYWavelength

public float getYWavelength()
Get the wavelength of ripple in the Y direction.

Returns:
the wavelength (in pixels).
See Also:
setYWavelength(float)

setWaveType

public void setWaveType(String waveType)
                 throws ExpressionException
Set the wave type. valid values are: - sine (default): Sine wave ripples. - sawtooth: Sawtooth wave ripples. - triangle: Triangle wave ripples. - noise: Noise ripples.

Parameters:
waveType - the type.
Throws:
ExpressionException
See Also:
getWaveType()

getWaveType

public int getWaveType()
Get the wave type.

Returns:
the type.
See Also:
setWaveType(java.lang.String)

toString

public String toString()
Overrides:
toString in class Object

filter

public BufferedImage filter(BufferedImage src,
                            Struct parameters)
                     throws PageException
Specified by:
filter in interface DynFiltering
Overrides:
filter in class TransformFilter
Throws:
PageException


Copyright © 2012 Railo