Packagede.popforge.imageprocessing.filters.distortion
Classpublic final class Twirl
InheritanceTwirl Inheritance GeometricDisplacementMap

The Twirl class is a filter that displaces an image using a twirl map.

Supported formats:


Example
  
  var filter: Twirl = new Twirl( 80, 60, 60 );
  
  var video: WebCam = new WebCam( 160, 120 );
  var image: Image = new Image( 160, 120, ImageFormat.RGB );
  
  image.loadBitmapData( video.getCurrentFrame(), true );
  
  filter.apply( image );
  

See also

de.popforge.imageprocessing.geom.maps.TwirlMap


Public Methods
 MethodDefined by
  
Twirl(centerX:Number = 100, centerY:Number = 100, angle:Number = 3.141, radius:Number = 50, wrap:Boolean = false, interpolation:Class = null)
Creates a new Twirl object.
Twirl
 Inherited
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.
Twirl
Constructor detail
Twirl()constructor
public function Twirl(centerX:Number = 100, centerY:Number = 100, angle:Number = 3.141, radius:Number = 50, wrap:Boolean = false, interpolation:Class = null)

Creates a new Twirl object.

Parameters
centerX:Number (default = 100) — The x position of the twirl´s center.
 
centerY:Number (default = 100) — The y position of the twirl´s center.
 
angle:Number (default = 3.141) — The angle of the twirl in radians.
 
radius:Number (default = 50) — The radius of the twirl.
 
wrap:Boolean (default = false)true if pixels that go over the edge should be wrapped around.
 
interpolation:Class (default = null) — The interpolation method to use. Default is Interpolation.BILINEAR.
Method detail
toString()method
public override function toString():String

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

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