Package com.jhlabs.image
Class MarbleFilter
java.lang.Object
com.jhlabs.image.AbstractBufferedImageOp
com.jhlabs.image.TransformFilter
com.jhlabs.image.MarbleFilter
- All Implemented Interfaces:
BufferedImageOp
,Cloneable
This filter applies a marbling effect to an image, displacing pixels by random amounts.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloat
float[]
float[]
float
float
float
Fields inherited from class com.jhlabs.image.TransformFilter
BILINEAR, CLAMP, edgeAction, interpolation, NEAREST_NEIGHBOUR, originalSpace, transformedSpace, WRAP, ZERO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilter
(BufferedImage src, BufferedImage dst) float
float
float
float
void
setAmount
(float amount) void
setTurbulence
(float turbulence) void
setXScale
(float xScale) void
setYScale
(float yScale) toString()
protected void
transformInverse
(int x, int y, float[] out) Methods inherited from class com.jhlabs.image.TransformFilter
filterPixelsNN, getEdgeAction, getInterpolation, setEdgeAction, setInterpolation, transformSpace
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
Field Details
-
sinTable
public float[] sinTable -
cosTable
public float[] cosTable -
xScale
public float xScale -
yScale
public float yScale -
amount
public float amount -
turbulence
public float turbulence
-
-
Constructor Details
-
MarbleFilter
public MarbleFilter()
-
-
Method Details
-
setXScale
public void setXScale(float xScale) -
getXScale
public float getXScale() -
setYScale
public void setYScale(float yScale) -
getYScale
public float getYScale() -
setAmount
public void setAmount(float amount) -
getAmount
public float getAmount() -
setTurbulence
public void setTurbulence(float turbulence) -
getTurbulence
public float getTurbulence() -
transformInverse
protected void transformInverse(int x, int y, float[] out) - Specified by:
transformInverse
in classTransformFilter
-
filter
- Specified by:
filter
in interfaceBufferedImageOp
- Overrides:
filter
in classTransformFilter
-
toString
-