public static function clipPoint(r:Rectangle, p:Point):Point
Clips a point inside a rectangle.
Parameters
| r:Rectangle — Bounding rectangle
|
| |
| p:Point — Point to clip.
|
Returns
public static function clipSegment(t:Sprite, x0:Number, y0:Number, x1:Number, y1:Number):Point
Clips a segment given two points.
Parameters
| t:Sprite — Sprite
|
| |
| x0:Number — Start point X coordinate.
|
| |
| y0:Number — Start point Y coordinate.
|
| |
| x1:Number — Final point X coordinate.
|
| |
| y1:Number — Final point Y coordinate.
|
Returns
public static function clonePath(arr:Array):ArrayParameters
Returns
public static function firstSignificantSegmentIndex(pts:Array):intParameters
Returns
public static function getArrowCoordinates(x0:Number, y0:Number, x1:Number, y1:Number, width:Number, height:Number):Array
Returns polyline points array that describes an arrow shape given to extreme corners, the arrow width and the arrow height.
Parameters
| x0:Number — First arrow corner X coordinate.
|
| |
| y0:Number — First arrow corner Y coordinate.
|
| |
| x1:Number — Second arrow corner X coordinate.
|
| |
| y1:Number — Second arrow corner Y coordinate.
|
| |
| width:Number — Arrow width.
|
| |
| height:Number — Arrow height.
|
Returns
| Array — Arrow polyline points.
|
public static function getIntersectionRectBetweenPointsAndRect(p0:Point, p1:Point, rect:Rectangle):Rectangle
Gets intersection rectangle between segment(p0,p1) and given rectangle
Parameters
| p0:Point — Point0 of segment
|
| |
| p1:Point — Point1 of segment
|
| |
| rect:Rectangle |
Returns
| Rectangle — intersection rectangle
|
public static function getSegmentRotation(x0:Number, y0:Number, x1:Number, y1:Number):Number
Returns the rotation angle of a segment that is used to reshape links given a start point and a final point (horizontal and vertical segments combination).
Parameters
| x0:Number — Start point X coordinate.
|
| |
| y0:Number — Start point Y coordinate.
|
| |
| x1:Number — Final point X coordinate.
|
| |
| y1:Number — Final point Y coordinate.
|
Returns
| Number — Segment rotation angle.
|
public static function getTextFormat(fontname:String):TextFormat
Returns a text format (font, bold, italic) according to a font name.
Parameters
| fontname:String — Font name.
|
Returns
| TextFormat — Text Format containing the input font properties.
|
public static function globalToLocalRectangle(target:DisplayObject, rect:Rectangle):Rectangle
Converts a rectangle description to a local rectangle description according to a target display object (a container).
Parameters
| target:DisplayObject — Target Display Object that defines the local reference.
|
| |
| rect:Rectangle — Global Rectangle description.
|
Returns
| Rectangle — Loacal Rectangle description in the Target Display Object.
|
public static function intersectCurvedLineToRectangle(curveLine:Array, rect:Rectangle):Boolean
Checks if a bezier curve intersects with a rectangle.
Parameters
| curveLine:Array — Bezier curve path.
|
| |
| rect:Rectangle — Input rectangle.
|
Returns
| Boolean — True if rectangle intersetcs the bezier curve.
|
public static function isEmbeddedFont(fontname:String):Boolean
Checks if a font string refrence (font name) is supported by the current application.
Parameters
| fontname:String — Font name.
|
Returns
| Boolean — True if the font is supported.
|
public static function isHorizontal(idx:int, pts:Array):Boolean
Checks if a segment linking two points (contained in a points array and defined by an index) is horizontal.
Parameters
| idx:int — Point index.
|
| |
| pts:Array — Array points from which the two points will be extracted.
|
Returns
| Boolean — True if the described segment is horizontal.
|
public static function localToGlobalRectangle(target:DisplayObject, rect:Rectangle):Rectangle
Converts a local rectangle description according to a target display object (a container) to a global rectangle description .
Parameters
| target:DisplayObject — Target Display Object that defines the local reference of the input rectangle description.
|
| |
| rect:Rectangle — Local Rectangle description in the Target Display Object.
|
Returns
| Rectangle — Global Rectangle description .
|
public static function overSamplePath(path:Array, nb:uint):ArrayParameters
Returns
public static function pointIsNearSegment(p:Point, lp1:Point, lp2:Point, tolerance:Number):BooleanParameters
| p:Point |
| |
| lp1:Point |
| |
| lp2:Point |
| |
| tolerance:Number |
Returns
public static function pointToLineDistance(p0:Point, lp1:Point, lp2:Point):NumberParameters
| p0:Point |
| |
| lp1:Point |
| |
| lp2:Point |
Returns
public static function segmentIntersectsWithRectangle(p0:Point, p1:Point, rect:Rectangle):Boolean
Checks if segment(p0,p1) intersects given rectangle
Parameters
| p0:Point — Point0 of segment
|
| |
| p1:Point — Point1 of segment
|
| |
| rect:Rectangle |
Returns
| Boolean — true if segment intersects with rectangle false otherwise.
|
public static const PIO2:Number = 1.5707963267948966
90°
public static const TWOPI:Number = 6.283185307179586
360°