com.jhlabs.image

Class DiffuseFilter

Implemented Interfaces:
BufferedImageOp, Cloneable

public class DiffuseFilter
extends TransformFilter

This filter diffuses an image by moving its pixels in random directions.

Field Summary

Fields inherited from class com.jhlabs.image.TransformFilter

BILINEAR, CLAMP, NEAREST_NEIGHBOUR, RGB_CLAMP, WRAP, ZERO, edgeAction, interpolation, originalSpace, transformedSpace

Constructor Summary

DiffuseFilter()

Method Summary

BufferedImage
filter(BufferedImage src, BufferedImage dst)
float
getScale()
Returns the scale of the texture.
void
setScale(float scale)
Specifies the scale of the texture.
String
toString()
protected void
transformInverse(int x, int y, float[] out)
Inverse transform a point.

Methods inherited from class com.jhlabs.image.TransformFilter

filter, filterPixelsNN, getEdgeAction, getInterpolation, setEdgeAction, setInterpolation, transformInverse, transformSpace

Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp

clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRGB, getRenderingHints, setRGB

Constructor Details

DiffuseFilter

public DiffuseFilter()

Method Details

filter

public BufferedImage filter(BufferedImage src,
                            BufferedImage dst)
Overrides:
filter in interface TransformFilter

getScale

public float getScale()
Returns the scale of the texture.
Returns:
the scale of the texture.

setScale

public void setScale(float scale)
Specifies the scale of the texture.
Parameters:
scale - the scale of the texture.

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.
Overrides:
transformInverse in interface TransformFilter
Parameters:
x - the X position of the pixel in the output image
y - the Y position of the pixel in the output image
out - the position of the pixel in the input image