Package | com.boostworthy.geom |
Class | public class Path |
Implements | IDisposable |
Property | Defined by | ||
---|---|---|---|
end : Point [read-only]
Gets the end point of the path.
| Path | ||
start : Point [read-only]
Gets the starting point of the path.
| Path |
Property | Defined by | ||
---|---|---|---|
m_aSegments : Array
An array for storing path segments that form this path.
| Path | ||
m_objLocation : Point
Stores a coordinate of the current location inside this path.
| Path |
Method | Defined by | ||
---|---|---|---|
Path()
Constructor.
| Path | ||
clear():void
Clears the data being stored by this object.
| Path | ||
curveTo(nControlX:Number, nControlY:Number, nX:Number, nY:Number):void
Creates a curve from the current location to the specified coordinate.
| Path | ||
dispose():void
Performs any appropriate clean-up tasks for garbage collection such as
removing event listeners, setting object references to 'null', etc.
| Path | ||
draw(objGraphics:Graphics):void
Uses the data stored by this object to draw a path into the specified graphics object.
| Path | ||
getAngleAt(nPosition:Number):Number
Gets the angle of a position along this path using a float value of '0.0' to '1.0' where '0.0' is the start of the path and '1.0' is the end of the path.
| Path | ||
getPointAt(nPosition:Number):Point
Gets the coordinate of a position along this path using a float value of '0.0' to '1.0' where '0.0' is the start of the path and '1.0' is the end of the path.
| Path | ||
lineTo(nX:Number, nY:Number):void
Creates a line from the current location to the specified coordinate.
| Path | ||
moveTo(nX:Number, nY:Number):void
Moves the current location to the specified coordinate.
| Path | ||
reset():void
Resets and clears this object back to new.
| Path |
Method | Defined by | ||
---|---|---|---|
addSegment(objSegment:IPathSegment):void
Adds a new segment to this path.
| Path | ||
init():void
Initializes this object.
| Path |
end | property |
end:Point
[read-only]Gets the end point of the path.
Implementation public function get end():Point
m_aSegments | property |
protected var m_aSegments:Array
An array for storing path segments that form this path.
m_objLocation | property |
protected var m_objLocation:Point
Stores a coordinate of the current location inside this path.
start | property |
start:Point
[read-only]Gets the starting point of the path.
Implementation public function get start():Point
Path | () | constructor |
public function Path()
Constructor.
addSegment | () | method |
protected function addSegment(objSegment:IPathSegment):void
Adds a new segment to this path.
ParametersobjSegment:IPathSegment — The segment to add to this path.
|
clear | () | method |
public function clear():void
Clears the data being stored by this object.
curveTo | () | method |
public function curveTo(nControlX:Number, nControlY:Number, nX:Number, nY:Number):void
Creates a curve from the current location to the specified coordinate. The current location picks up from wherever the last segment ended or can be set manually using the 'MoveTo' method.
ParametersnControlX:Number — The 'x' position for the control point.
|
|
nControlY:Number — The 'y' position for the control point.
|
|
nX:Number — The 'x' position for the curve to end at.
|
|
nY:Number — The 'y' position for the curve to end at.
|
See also
dispose | () | method |
public function dispose():void
Performs any appropriate clean-up tasks for garbage collection such as removing event listeners, setting object references to 'null', etc.
draw | () | method |
public function draw(objGraphics:Graphics):void
Uses the data stored by this object to draw a path into the specified graphics object.
ParametersobjGraphics:Graphics — The graphics object to draw the path into.
|
getAngleAt | () | method |
public function getAngleAt(nPosition:Number):Number
Gets the angle of a position along this path using a float value of '0.0' to '1.0' where '0.0' is the start of the path and '1.0' is the end of the path.
ParametersnPosition:Number — The position along this path (0.0 to 1.0) to get the angle from.
|
Number — The angle of the path at the specified position.
|
getPointAt | () | method |
public function getPointAt(nPosition:Number):Point
Gets the coordinate of a position along this path using a float value of '0.0' to '1.0' where '0.0' is the start of the path and '1.0' is the end of the path.
ParametersnPosition:Number — The position along this path (0.0 to 1.0) to get a coordinate from.
|
Point — The coordinate at the specified position.
|
init | () | method |
protected function init():void
Initializes this object.
lineTo | () | method |
public function lineTo(nX:Number, nY:Number):void
Creates a line from the current location to the specified coordinate. The current location picks up from wherever the last segment ended or can be set manually using the 'MoveTo' method.
ParametersnX:Number — The 'x' position for the line to end at.
|
|
nY:Number — The 'y' position for the line to end at.
|
See also
moveTo | () | method |
public function moveTo(nX:Number, nY:Number):void
Moves the current location to the specified coordinate. This location represents the starting point segments and gets updated each time a new segment is added.
ParametersnX:Number — The 'x' position to move to.
|
|
nY:Number — The 'y' position to move to.
|
reset | () | method |
public function reset():void
Resets and clears this object back to new.