com.jhlabs.image
Class DiffuseFilter

java.lang.Object
  extended by com.jhlabs.image.AbstractBufferedImageOp
      extended by com.jhlabs.image.TransformFilter
          extended by com.jhlabs.image.DiffuseFilter
All Implemented Interfaces:
java.awt.image.BufferedImageOp, java.lang.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, edgeAction, interpolation, NEAREST_NEIGHBOUR, originalSpace, RGB_CLAMP, transformedSpace, WRAP, ZERO
 
Constructor Summary
DiffuseFilter()
           
 
Method Summary
 java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
           
 float getScale()
          Returns the scale of the texture.
 void setScale(float scale)
          Specifies the scale of the texture.
 java.lang.String toString()
           
protected  void transformInverse(int x, int y, float[] out)
          Inverse transform a point.
 
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DiffuseFilter

public DiffuseFilter()
Method Detail

setScale

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

Parameters:
scale - the scale of the texture.
See Also:
getScale()

getScale

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

Returns:
the scale of the texture.
See Also:
setScale(float)

transformInverse

protected void transformInverse(int x,
                                int y,
                                float[] out)
Description copied from class: TransformFilter
Inverse transform a point. This method needs to be overriden by all subclasses.

Specified by:
transformInverse in class 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

filter

public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src,
                                           java.awt.image.BufferedImage dst)
Specified by:
filter in interface java.awt.image.BufferedImageOp
Overrides:
filter in class TransformFilter

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object