railo.runtime.img.filter
Class DisplaceFilter

java.lang.Object
  extended by railo.runtime.img.filter.AbstractBufferedImageOp
      extended by railo.runtime.img.filter.TransformFilter
          extended by railo.runtime.img.filter.DisplaceFilter
All Implemented Interfaces:
BufferedImageOp, Cloneable, DynFiltering

public class DisplaceFilter
extends TransformFilter
implements DynFiltering

A filter which simulates the appearance of looking through glass. A separate grayscale displacement image is provided and pixels in the source image are displaced according to the gradient of the displacement map.


Field Summary
 
Fields inherited from class railo.runtime.img.filter.TransformFilter
BILINEAR, NEAREST_NEIGHBOUR
 
Constructor Summary
DisplaceFilter()
           
 
Method Summary
 BufferedImage filter(BufferedImage src, BufferedImage dst)
           
 BufferedImage filter(BufferedImage src, Struct parameters)
           
 float getAmount()
          Get the amount of distortion.
 BufferedImage getDisplacementMap()
          Get the displacement map.
 void setAmount(float amount)
          Set the amount of distortion.
 void setDisplacementMap(BufferedImage displacementMap)
          Set the displacement map.
 String toString()
           
 
Methods inherited from class railo.runtime.img.filter.TransformFilter
getEdgeAction, getInterpolation, setEdgeAction, setInterpolation
 
Methods inherited from class railo.runtime.img.filter.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DisplaceFilter

public DisplaceFilter()
Method Detail

setDisplacementMap

public void setDisplacementMap(BufferedImage displacementMap)
Set the displacement map.

Parameters:
displacementMap - an image representing the displacment at each point
See Also:
getDisplacementMap()

getDisplacementMap

public BufferedImage getDisplacementMap()
Get the displacement map.

Returns:
an image representing the displacment at each point
See Also:
setDisplacementMap(java.awt.image.BufferedImage)

setAmount

public void setAmount(float amount)
Set the amount of distortion.

Parameters:
amount - the amount
See Also:
getAmount()

getAmount

public float getAmount()
Get the amount of distortion.

Returns:
the amount
See Also:
setAmount(float)

filter

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

toString

public String toString()
Overrides:
toString in class Object

filter

public BufferedImage filter(BufferedImage src,
                            Struct parameters)
                     throws PageException
Specified by:
filter in interface DynFiltering
Overrides:
filter in class TransformFilter
Throws:
PageException


Copyright © 2012 Railo