Holds various utility functions used throughout the charting system
support
public static function adjustScale(interval:int):int
Adjust an interval value to a "pretty" value
Parameters
Returns
public static function brighterColor(clr:uint, intensity:Number = .125):uintParameters
| clr:uint |
| |
| intensity:Number (default = .125) |
Returns
public static function brighterMix(clr:uint, intensity:Number = .125):uintParameters
| clr:uint |
| |
| intensity:Number (default = .125) |
Returns
public static function checkOverlap(d:Number, hd:Number, vd:Number, r:Number, s:Number = 1):Boolean
Checks whether two parralel lines are separated by less thana specified amount
Parameters
| d:Number — The horizotal distance between the two origins
|
| |
| hd:Number — The length of the lines
|
| |
| vd:Number — The minimum vertical distance between the lines
|
| |
| r:Number — The rotation of the lines
|
| |
| s:Number (default = 1) — The scale
|
Returns
| Boolean — Returns true if the lines cross or are less than the specified separation
|
public static function cos(angle:Number):NumberParameters
Returns
public static function darkerColor(clr:uint, intensity:Number = .875):uintParameters
| clr:uint |
| |
| intensity:Number (default = .875) |
Returns
public static function darkerMix(clr:uint, intensity:Number = .125):uintParameters
| clr:uint |
| |
| intensity:Number (default = .125) |
Returns
public static function distance(x:int, y:int):int
calculate the distance of a point from the origin
Parameters
| x:int — x coordinate
|
| |
| y:int — y coordinate
|
Returns
public static function formatPercent(r:Number, dp:int):String
format a number as percentage
Parameters
| r:Number — ratio
|
| |
| dp:int — decimal places
|
Returns
public static function getColor(r:int, g:int, b:int):uintParameters
Returns
public static function getEffectiveHeight(w:Number, h:Number, r:Number, s:Number = 1):Number
Get the vertical height of a rotated rectangle
Parameters
| w:Number — width
|
| |
| h:Number — height
|
| |
| r:Number — rotation in degrees
|
| |
| s:Number (default = 1) — scaling
|
Returns
public static function getEffectiveWidth(w:Number, h:Number, r:Number, s:Number = 1):Number
Get the horizontal width of a rotated rectangle
Parameters
| w:Number — width
|
| |
| h:Number — height
|
| |
| r:Number — rotation in degrees
|
| |
| s:Number (default = 1) — scaling
|
Returns
| Number — horizontal width
|
public static function getPoint(radius:Number, angle:Number):Point
Converts a pair of polar coordinates to a Cartesian point coordinate.
Calculate the coordinates of a point on a circle
Parameters
| radius:Number — the radius of the circle
|
| |
| angle:Number — the angle
|
Returns
| Point — A Point object representing the relevant coordinates
|
public static function getRectangle(left:int, top:int, width:int, height:int):RectangleParameters
| left:int |
| |
| top:int |
| |
| width:int |
| |
| height:int |
Returns
public static function getRectangle2(left:int, top:int, right:int, bottom:int):RectangleParameters
| left:int |
| |
| top:int |
| |
| right:int |
| |
| bottom:int |
Returns
public static function getRGB(clr:uint):ObjectParameters
Returns
public static function getRotationForDistance(h:Number, tw:Number, s:Number = 1):Number
Calculate the angle of rotation of two parralel lines such that the perpendicular distance between them is as specified
Parameters
| h:Number — The target distance between the two lines
|
| |
| tw:Number — The horizontal separation of the two lines
|
| |
| s:Number (default = 1) — A scaling factor to apply to the result
|
Returns
| Number — The angle of rotation or NaN if it cannot be resolved
|
public static function getVerticalDistance(tw:Number, r:Number, s:Number = 1):Number
Calculate the perpendicular distance between two rotated parralell lines
Parameters
| tw:Number — The horizontal separation of the two lines
|
| |
| r:Number — The rotation in degress of the two lines
|
| |
| s:Number (default = 1) — A scaling factor to apply to the result
|
Returns
public static function rotatePoint(point:Point, angle:Number):PointParameters
Returns
public static function scalePoint(point:Point, x:Number, y:Number):PointParameters
| point:Point |
| |
| x:Number |
| |
| y:Number |
Returns
public static function setRectangle(rc:Rectangle, left:int, top:int, width:int, height:int):RectangleParameters
| rc:Rectangle |
| |
| left:int |
| |
| top:int |
| |
| width:int |
| |
| height:int |
Returns
public static function sin(angle:Number):NumberParameters
Returns
public static function skewXPoint(point:Point, angle:Number):PointParameters
Returns
public static function skewYPoint(point:Point, angle:Number):PointParameters
Returns
public static const degToRad:Number
protected static const rc:Rectangle