public class WaterFilter extends TransformFilter
Modifier and Type | Field and Description |
---|---|
private float |
amplitude |
private float |
centreX |
private float |
centreY |
private float |
icentreX |
private float |
icentreY |
private float |
phase |
private float |
radius |
private float |
radius2 |
private float |
wavelength |
BILINEAR, CLAMP, edgeAction, interpolation, NEAREST_NEIGHBOUR, originalSpace, RGB_CLAMP, transformedSpace, WRAP, ZERO
Constructor and Description |
---|
WaterFilter() |
Modifier and Type | Method and Description |
---|---|
BufferedImage |
filter(BufferedImage src,
BufferedImage dst) |
float |
getAmplitude()
Get the amplitude of the ripples.
|
Point2D |
getCentre()
Get the centre of the effect as a proportion of the image size.
|
float |
getCentreX()
Get the centre of the effect in the X direction as a proportion of the image size.
|
float |
getCentreY()
Get the centre of the effect in the Y direction as a proportion of the image size.
|
float |
getPhase()
Get the phase of the ripples.
|
float |
getRadius()
Get the radius of the effect.
|
float |
getWavelength()
Get the wavelength of the ripples.
|
private boolean |
inside(int v,
int a,
int b) |
void |
setAmplitude(float amplitude)
Set the amplitude of the ripples.
|
void |
setCentre(Point2D centre)
Set the centre of the effect as a proportion of the image size.
|
void |
setCentreX(float centreX)
Set the centre of the effect in the X direction as a proportion of the image size.
|
void |
setCentreY(float centreY)
Set the centre of the effect in the Y direction as a proportion of the image size.
|
void |
setPhase(float phase)
Set the phase of the ripples.
|
void |
setRadius(float radius)
Set the radius of the effect.
|
void |
setWavelength(float wavelength)
Set the wavelength of the ripples.
|
String |
toString() |
protected void |
transformInverse(int x,
int y,
float[] out)
Inverse transform a point.
|
filterPixelsNN, getEdgeAction, getInterpolation, setEdgeAction, setInterpolation, transformSpace
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
private float wavelength
private float amplitude
private float phase
private float centreX
private float centreY
private float radius
private float radius2
private float icentreX
private float icentreY
public WaterFilter()
public void setWavelength(float wavelength)
wavelength
- the wavelengthgetWavelength()
public float getWavelength()
setWavelength(float)
public void setAmplitude(float amplitude)
amplitude
- the amplitudegetAmplitude()
public float getAmplitude()
setAmplitude(float)
public void setPhase(float phase)
phase
- the phasegetPhase()
public float getPhase()
setPhase(float)
public void setCentreX(float centreX)
centreX
- the centergetCentreX()
public float getCentreX()
setCentreX(float)
public void setCentreY(float centreY)
centreY
- the centergetCentreY()
public float getCentreY()
setCentreY(float)
public void setCentre(Point2D centre)
centre
- the centergetCentre()
public Point2D getCentre()
setCentre(java.awt.geom.Point2D)
public void setRadius(float radius)
radius
- the radiusgetRadius()
public float getRadius()
setRadius(float)
private boolean inside(int v, int a, int b)
public BufferedImage filter(BufferedImage src, BufferedImage dst)
filter
in interface BufferedImageOp
filter
in class TransformFilter
protected void transformInverse(int x, int y, float[] out)
TransformFilter
transformInverse
in class 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 imageWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses