Packagede.popforge.imageprocessing.filters.distortion
Classpublic class GeometricDisplacementMap
ImplementsIFilter
SubclassesRipple, Spherize, Twirl

The GeometricDisplacementMap class is a filter that uses a mathematical representaton of a displacement map to distort an image. This class is only a base class for all the other filters that have a displacement map which is describe by a mathematical function instead of a BitmapData (like the DisplacementMap class uses).

The function of this class is to apply the following steps:

  1. Get displaced position of x and y from GeometricMap.
  2. Get interpolated color at new position.
  3. Set color at old xy position to the new one.

Supported formats:



Public Methods
 MethodDefined by
  
GeometricDisplacementMap(displacementMap:GeometricMap, interpolationMethod:Class = null, wrap:Boolean = false)
Creates a new GeometritcDisplacementMap object.
GeometricDisplacementMap
  
apply(image:Image):void
Applies the filter to the given Image object.
GeometricDisplacementMap
  
toString():String
Builds and returns a string containing the name of the class.
GeometricDisplacementMap
Constructor detail
GeometricDisplacementMap()constructor
public function GeometricDisplacementMap(displacementMap:GeometricMap, interpolationMethod:Class = null, wrap:Boolean = false)

Creates a new GeometritcDisplacementMap object.

Parameters
displacementMap:GeometricMap — The type of displacement map that should be used.
 
interpolationMethod:Class (default = null) — The interpolation method to use. Default is Interpolation.BILINEAR.
 
wrap:Boolean (default = false)true if pixels that go over the edge should be wrapped around.
Method detail
apply()method
public function apply(image:Image):void

Applies the filter to the given Image object.

Parameters
image:Image — The image that will be manipulated.
toString()method 
public function toString():String

Builds and returns a string containing the name of the class.

Returns
String — A string containing the name of the class.