Represents a 2D line segment.
public function Line(x1:Number = 0.0, y1:Number = 0.0, x2:Number = 0.0, y2:Number = 0.0)
constructs and initializes a Line from the specified coordinates.
Parameters | x1:Number (default = 0.0 )
|
|
| y1:Number (default = 0.0 )
|
|
| x2:Number (default = 0.0 )
|
|
| y2:Number (default = 0.0 )
|
public static function createLineByPointAngleLength(pt:Point, angleInRadians:Number, length:Number):Line
returns the Line from a starting point, of a given angle and length.
Parameters
| pt:Point — line startpont.
|
|
| angleInRadians:Number — angle in radians.
|
|
| length:Number — line length.
|
Returns | Line — calculated Line.
TODO: not yet tested.
|
public static function createLineByPoints(pt1:Point, pt2:Point):Line
returns the Line defined by two Points.
Parameters
| pt1:Point — line startpoint.
|
|
| pt2:Point — line endpoint.
|
Returns public function getAngle():Number
angle of this Line (in radians).
Returns public function getBounds():Rectangle
Returns public function getIntersection(line:Line, bWithinSegmentBounds:Boolean = false):Point
returns the Point of intersection of this and another Line.
if Lines are parallel, returns null.
Parameters
| line:Line — other Line with which to find intersection.
|
|
| bWithinSegmentBounds:Boolean (default = false ) — if true, returns intersections only with Line.getBounds of each Line.
|
Returns public function getPt1():Point
retrieve Line startpoint.
Returns public function getPt2():Point
retrieve Line endpoint.
Returns public function getSlope():Number
Returns public function getYIntercept():Number
Returns
Sun Jan 30 2011, 04:49 PM -08:00