Packageorg.axiis.utils
Classpublic class GraphicUtils
InheritanceGraphicUtils Inheritance Object

An all static class containing methods used to create Degrafa geometry.



Public Methods
 MethodDefined By
  
buildSegmentsFromCurvePoints(graphicPoints:Array, tension:Number = .25):Array
[static] Converts an Array of GraphicPoints into a series of curveTo commands that can then be used to draw a curve to a graphics context.
GraphicUtils
  
calculatePosFromX(xPos:Number, dataCollection:Object, xDataField:String, yDataField:String, xScale:LinearScale, yScale:LinearScale, interpolate:Boolean = true):GraphicPoint
[static]
GraphicUtils
Protected Methods
 MethodDefined By
  
calculatePosBinarySearch(array:Array, dataField:String, val:Number):int
[static]
GraphicUtils
Method Detail
buildSegmentsFromCurvePoints()method
public static function buildSegmentsFromCurvePoints(graphicPoints:Array, tension:Number = .25):Array

Converts an Array of GraphicPoints into a series of curveTo commands that can then be used to draw a curve to a graphics context.

Parameters

graphicPoints:Array — The Array of GraphicPoints to draw the curve between.
 
tension:Number (default = .25) — A value between 0 and 1 representing the rigidity of the curve. A tension of 1 will produce a straight line while a tension of 0 will result in a highly curved Bezier curve.

Returns
Array
calculatePosBinarySearch()method 
protected static function calculatePosBinarySearch(array:Array, dataField:String, val:Number):int

Parameters

array:Array
 
dataField:String
 
val:Number

Returns
int
calculatePosFromX()method 
public static function calculatePosFromX(xPos:Number, dataCollection:Object, xDataField:String, yDataField:String, xScale:LinearScale, yScale:LinearScale, interpolate:Boolean = true):GraphicPoint

Parameters

xPos:Number
 
dataCollection:Object
 
xDataField:String
 
yDataField:String
 
xScale:LinearScale
 
yScale:LinearScale
 
interpolate:Boolean (default = true)

Returns
GraphicPoint