public class MarbleFilter extends TransformFilter
Modifier and Type | Field and Description |
---|---|
private float |
amount |
private float[] |
cosTable |
private float[] |
sinTable |
private float |
turbulence |
private float |
xScale |
private float |
yScale |
BILINEAR, CLAMP, edgeAction, interpolation, NEAREST_NEIGHBOUR, originalSpace, RGB_CLAMP, transformedSpace, WRAP, ZERO
Constructor and Description |
---|
MarbleFilter() |
Modifier and Type | Method and Description |
---|---|
private int |
displacementMap(int x,
int y) |
BufferedImage |
filter(BufferedImage src,
BufferedImage dst) |
float |
getAmount()
Get the amount of effect.
|
float |
getTurbulence()
Returns the turbulence of the effect.
|
float |
getXScale()
Get the X scale of the effect.
|
float |
getYScale()
Get the Y scale of the effect.
|
private void |
initialize() |
void |
setAmount(float amount)
Set the amount of effect.
|
void |
setTurbulence(float turbulence)
Specifies the turbulence of the effect.
|
void |
setXScale(float xScale)
Set the X scale of the effect.
|
void |
setYScale(float yScale)
Set the Y scale of the effect.
|
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[] sinTable
private float[] cosTable
private float xScale
private float yScale
private float amount
private float turbulence
public MarbleFilter()
public void setXScale(float xScale)
xScale
- the scale.getXScale()
public float getXScale()
setXScale(float)
public void setYScale(float yScale)
yScale
- the scale.getYScale()
public float getYScale()
setYScale(float)
public void setAmount(float amount)
amount
- the amountgetAmount()
public float getAmount()
setAmount(float)
public void setTurbulence(float turbulence)
turbulence
- the turbulence of the effect.getTurbulence()
public float getTurbulence()
setTurbulence(float)
private void initialize()
private int displacementMap(int x, int y)
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 imagepublic BufferedImage filter(BufferedImage src, BufferedImage dst)
filter
in interface BufferedImageOp
filter
in class TransformFilter
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses