| Package | org.un.flex.utils |
| Class | public class GraphicUtils |
| Method | Defined by | ||
|---|---|---|---|
|
drawArc(g:Graphics, angleDelta:Number, centerX:Number, centerY:Number, startX:Number, startY:Number):void
[static]
Draws an arc starting at P and subtending an angle at
the center of the circle O, where:
angle = angleDelta O = [centerX, centerY] P = [startX, startY] | GraphicUtils | ||
|
equal(p1:Point, p2:Point):Boolean
[static]
Function that tests if two points are equal within tolerance
The current tolerance limit is (1, 1) - same as pixel resolution on screen
| GraphicUtils | ||
|
getAngle(x1:Number, y1:Number, x2:Number, y2:Number, atX:Number, atY:Number):Number
[static]
Returns the positive angle between two lines OP and OQ at point O, where:
P = [x1, y1] Q = [x2, y2] O = [atX, atY] | GraphicUtils | ||
|
getCenter(c:DisplayObject):Point
[static]
Function that returns the center point of a display object
| GraphicUtils | ||
|
getRotation(angleDelta:Number, centerX:Number, centerY:Number, startX:Number, startY:Number):Point
[static]
Returns the endpoint Q of a line OP that is rotated clock-wise about point O, where:
O = [centerX, centerY] P = [startX, startY] Q = [endX, endY] | GraphicUtils | ||
| drawArc | () | method |
public static function drawArc(g:Graphics, angleDelta:Number, centerX:Number, centerY:Number, startX:Number, startY:Number):void
Draws an arc starting at P and subtending an angle at
the center of the circle O, where:
angle = angleDelta
O = [centerX, centerY]
P = [startX, startY]
g:Graphics |
|
angleDelta:Number |
|
centerX:Number |
|
centerY:Number |
|
startX:Number |
|
startY:Number |
| equal | () | method |
public static function equal(p1:Point, p2:Point):BooleanFunction that tests if two points are equal within tolerance The current tolerance limit is (1, 1) - same as pixel resolution on screen
Parametersp1:Point |
|
p2:Point |
Boolean |
| getAngle | () | method |
public static function getAngle(x1:Number, y1:Number, x2:Number, y2:Number, atX:Number, atY:Number):Number
Returns the positive angle between two lines OP and OQ at point O, where:
P = [x1, y1]
Q = [x2, y2]
O = [atX, atY]
x1:Number |
|
y1:Number |
|
x2:Number |
|
y2:Number |
|
atX:Number |
|
atY:Number |
Number |
| getCenter | () | method |
public static function getCenter(c:DisplayObject):PointFunction that returns the center point of a display object
Parametersc:DisplayObject |
Point |
| getRotation | () | method |
public static function getRotation(angleDelta:Number, centerX:Number, centerY:Number, startX:Number, startY:Number):Point
Returns the endpoint Q of a line OP that is rotated clock-wise about point O, where:
O = [centerX, centerY]
P = [startX, startY]
Q = [endX, endY]
angleDelta:Number |
|
centerX:Number |
|
centerY:Number |
|
startX:Number |
|
startY:Number |
Point |