com.jhlabs.image
Class RippleFilter
- BufferedImageOp, Cloneable
public class RippleFilter
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.
static int | NOISE - Noise ripples.
|
static int | SAWTOOTH - Sawtooth wave ripples.
|
static int | SINE - Sine wave ripples.
|
static int | TRIANGLE - Triangle wave ripples.
|
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(int 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()
|
protected void | transformInverse(int x, int y, float[] out) - Inverse transform a point.
|
protected void | transformSpace(Rectangle r) - Forward transform a rectangle.
|
NOISE
public static final int NOISE
Noise ripples.
SAWTOOTH
public static final int SAWTOOTH
Sawtooth wave ripples.
SINE
public static final int SINE
Sine wave ripples.
TRIANGLE
public static final int TRIANGLE
Triangle wave ripples.
RippleFilter
public RippleFilter()
Construct a RippleFilter.
getWaveType
public int getWaveType()
Get the wave type.
getXAmplitude
public float getXAmplitude()
Get the amplitude of ripple in the X direction.
- the amplitude (in pixels).
getXWavelength
public float getXWavelength()
Get the wavelength of ripple in the X direction.
- the wavelength (in pixels).
getYAmplitude
public float getYAmplitude()
Get the amplitude of ripple in the Y direction.
- the amplitude (in pixels).
getYWavelength
public float getYWavelength()
Get the wavelength of ripple in the Y direction.
- the wavelength (in pixels).
setWaveType
public void setWaveType(int waveType)
Set the wave type.
setXAmplitude
public void setXAmplitude(float xAmplitude)
Set the amplitude of ripple in the X direction.
xAmplitude
- the amplitude (in pixels).
setXWavelength
public void setXWavelength(float xWavelength)
Set the wavelength of ripple in the X direction.
xWavelength
- the wavelength (in pixels).
setYAmplitude
public void setYAmplitude(float yAmplitude)
Set the amplitude of ripple in the Y direction.
yAmplitude
- the amplitude (in pixels).
setYWavelength
public void setYWavelength(float yWavelength)
Set the wavelength of ripple in the Y direction.
yWavelength
- the wavelength (in pixels).
toString
public String toString()
transformInverse
protected void transformInverse(int x,
int y,
float[] out)
Inverse transform a point. This method needs to be overriden by all subclasses.
- transformInverse in interface TransformFilter
x
- the X position of the pixel in the output imagey
- the Y position of the pixel in the output imageout
- the position of the pixel in the input image
transformSpace
protected void transformSpace(Rectangle r)
Forward transform a rectangle. Used to determine the size of the output image.
- transformSpace in interface TransformFilter