Packageflare.vis.operator.distortion
Classpublic class Distortion
InheritanceDistortion Inheritance Layout Inheritance Operator
SubclassesBifocalDistortion, FisheyeDistortion

Base class for distortion operators that adjust the position and size of visual objects in a visualization.



Public Properties
 PropertyDefined by
  anchorInBounds : Boolean = true
Flag indicating if distortion anchor points outside the layout bounds should be considered by the distortion.
Distortion
  distortAxes : Boolean
Flag indicating if axes should be distorted.
Distortion
  distortSize : Boolean
Flag indicating if sizes should be distorted.
Distortion
  distortX : Boolean
Flag indicating if x-coordinates should be distorted.
Distortion
  distortY : Boolean
Flag indicating if y-coordinates should be distorted.
Distortion
 Inheritedenabled : Boolean
Indicates if the operator is enabled or disabled.
Operator
  layoutAnchor : Point
[write-only]
Distortion
 InheritedlayoutBounds : Rectangle
The layout bounds for the layout.
Layout
 InheritedlayoutRoot : DataSprite
The layout root, the root node for tree layouts.
Layout
 InheritedlayoutType : String = "null"
The type of layout and axes.
Layout
 Inheritedparameters : Object
Sets parameter values for this operator.
Operator
  resetSize : Boolean = false
Flag indicating if the size or scale values should be reset to 1 upon each invocation of the distortion.
Distortion
  useSizeField : Boolean = false
Flag indicating if the DataSprite.size field should be distorted.
Distortion
 Inheritedvisualization : Visualization
The visualization processed by this operator.
Operator
Protected Properties
 PropertyDefined by
 Inherited_anchor : Point
Layout
  _b : Rectangle
A bounding rectangle for storing the layout bounds.
Distortion
 Inherited_setAnchor : Boolean = false
Layout
 Inherited_t : Transitioner = null
A transitioner for storing value updates.
Layout
 InheritedxyAxes : CartesianAxes
Returns the visualization's axes as a CartesianAxes instance.
Layout
Public Methods
 MethodDefined by
  
Distortion(distortX:Boolean = true, distortY:Boolean = true, distortSize:Boolean = true, distortAxes:Boolean = true)
Creates a new Distortion.
Distortion
 Inherited
applyParameters(op:IOperator, params:Object):void
[static] Static method that applies parameter settings to an operator.
Operator
 Inherited
Strips all EdgeSprites in a visualization of any control points.
Layout
 Inherited
Hides the axes.
Layout
  
operate(t:Transitioner = null):void
Performs an operation over the contents of a visualization.
Distortion
 Inherited
setup():void
Setup method invoked whenever this operator's visualization property is set.
Operator
 Inherited
Reveals the axes.
Layout
 Inherited
[static] Updates all edges to be straight lines.
Layout
Protected Methods
 MethodDefined by
 Inherited
autoAnchor():void
Automatically-generate an anchor point.
Layout
  
Performs distortion of Cartesian axes.
Distortion
  
Distortion method for processing a DataSprite.
Distortion
 Inherited
layout():void
Calculates the spatial layout of visualized items.
Layout
 Inherited
minAngle(a1:Number, a2:Number):Number
Returns an angle value that minimizes the angular distance between a reference angle and a target angle.
Layout
  
sizeDistort(bb:Rectangle, x:Number, y:Number):Number
Compute a distorted size value.
Distortion
  
xDistort(x:Number):Number
Compute a distorted x-coordinate.
Distortion
  
yDistort(y:Number):Number
Compute a distorted y-coordinate.
Distortion
Public Constants
 ConstantDefined by
 InheritedCARTESIAN : String = "cartesian"
[static] Constant indicating Cartesian (x, y) coordinates.
Layout
 InheritedPOLAR : String = "polar"
[static] Constant indicating polar (radius, angle) coordinates.
Layout
Property detail
anchorInBoundsproperty
public var anchorInBounds:Boolean = true

Flag indicating if distortion anchor points outside the layout bounds should be considered by the distortion. If true, external anchors will be mapped to nearest point on the border of the layout bounds.

_bproperty 
protected var _b:Rectangle

A bounding rectangle for storing the layout bounds.

distortAxesproperty 
public var distortAxes:Boolean

Flag indicating if axes should be distorted.

distortSizeproperty 
public var distortSize:Boolean

Flag indicating if sizes should be distorted.

distortXproperty 
public var distortX:Boolean

Flag indicating if x-coordinates should be distorted.

distortYproperty 
public var distortY:Boolean

Flag indicating if y-coordinates should be distorted.

layoutAnchorproperty 
layoutAnchor:Point  [write-only]

Implementation
    public function set layoutAnchor(value:Point):void
resetSizeproperty 
public var resetSize:Boolean = false

Flag indicating if the size or scale values should be reset to 1 upon each invocation of the distortion. This avoids the need to manually reset the size values on each update. The default value is false.

useSizeFieldproperty 
public var useSizeField:Boolean = false

Flag indicating if the DataSprite.size field should be distorted. If false (the default), the scaleX and scaleY properties are used instead.

Constructor detail
Distortion()constructor
public function Distortion(distortX:Boolean = true, distortY:Boolean = true, distortSize:Boolean = true, distortAxes:Boolean = true)

Creates a new Distortion.

Parameters
distortX:Boolean (default = true) — Flag indicating if x-coordinates should be distorted
 
distortY:Boolean (default = true) — Flag indicating if y-coordinates should be distorted
 
distortSize:Boolean (default = true) — Flag indicating is sizes should be distorted
 
distortAxes:Boolean (default = true)
Method detail
axesDistort()method
protected function axesDistort(evt:VisualizationEvent):void

Performs distortion of Cartesian axes. As axis layout is recomputed after the operators have run, we must distort the axes in a separate step. This is accomplished by adding an update listener on the visualization that invokes the axis distortion after the axis layout has completed. This method is registered as the listener callback.

Parameters
evt:VisualizationEvent — the visualization update event
distort()method 
protected function distort(d:DataSprite):void

Distortion method for processing a DataSprite.

Parameters
d:DataSprite — a DataSprite to distort
operate()method 
public override function operate(t:Transitioner = null):void

Performs an operation over the contents of a visualization.

Parameters
t:Transitioner (default = null) — a Transitioner instance for collecting value updates.
sizeDistort()method 
protected function sizeDistort(bb:Rectangle, x:Number, y:Number):Number

Compute a distorted size value.

Parameters
bb:Rectangle — an object's bounding box
 
x:Number — the initial x-coordinate
 
y:Number — the initial y-coordinate

Returns
Number — the distorted size value
xDistort()method 
protected function xDistort(x:Number):Number

Compute a distorted x-coordinate.

Parameters
x:Number — the initial x-coordinate

Returns
Number — the distorted s-coordinate
yDistort()method 
protected function yDistort(y:Number):Number

Compute a distorted y-coordinate.

Parameters
y:Number — the initial y-coordinate

Returns
Number — the distorted y-coordinate