ActionScript 3.0 Language and Components Reference | All Packages | All Classes | Language Elements | Index | Appendixes | Conventions | Frames No Frames |
GraphicsPath

Package | flash.display
Class | public final class GraphicsPath
Inheritance | GraphicsPath Object
Implements | IGraphicsPath, IGraphicsData

A collection of drawing commands and the coordinate parameters for those commands.

A GraphicsPath object can be used with the `Graphics.drawGraphicsData()` method. When this object is drawn it is similar to calling the `Graphics.drawPath()` method.

See also

flash.display.Graphics.drawGraphicsData()
flash.display.Graphics.drawPath()

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | commands : Vector The Vector of drawing commands representing the path. | GraphicsPath
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | data : Vector The Vector containing the parameters to be used with the drawing commands. | GraphicsPath
|  | prototype : Object [static] A reference to the prototype object of a class or function object. | Object
|  | winding : String Specifies the winding rule using a value defined in the GraphicsPathWinding class. | GraphicsPath

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | GraphicsPath(commands:Vector = null, data:Vector = null, winding:String = "evenOdd") Creates a new GraphicsPath object. | GraphicsPath
|  | curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number):void Adds a new "curveTo" command to the commands vector and new coordinates to the data vector. | GraphicsPath
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | lineTo(x:Number, y:Number):void Adds a new "lineTo" command to the commands vector and new coordinates to the data vector. | GraphicsPath
|  | moveTo(x:Number, y:Number):void Adds a new "moveTo" command to the commands vector and new coordinates to the data vector. | GraphicsPath
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object
|  | wideLineTo(x:Number, y:Number):void Adds a new "wideLineTo" command to the commands vector and new coordinates to the data vector. | GraphicsPath
|  | wideMoveTo(x:Number, y:Number):void Adds a new "wideMoveTo" command to the commands vector and new coordinates to the data vector. | GraphicsPath

Property Detail

commands | property

`public var commands:Vector`

The Vector of drawing commands representing the path. Each command can be one of the values defined by the GraphicsPathCommand class.

See also

flash.display.GraphicsPathCommand

data | property |

`public var data:Vector`

The Vector containing the parameters to be used with the drawing commands.

winding | property |

`public var winding:String`

Specifies the winding rule using a value defined in the GraphicsPathWinding class.

See also

flash.display.GraphicsPathWinding
Constructor Detail

GraphicsPath | () | Constructor

`public function GraphicsPath(commands:Vector = null, data:Vector = null, winding:String = "evenOdd")`

Creates a new GraphicsPath object.

Parameters

| `commands:Vector` (default = `null`)`` — A Vector of integers representing commands defined by the GraphicsPathCommand class.
| `data:Vector` (default = `null`)`` — A Vector of Numbers where each pair of numbers is treated as a point (an x, y pair).
| `winding:String` (default = "`evenOdd`")`` — Specifies the winding rule using a value defined in the GraphicsPathWinding class.

See also

flash.display.GraphicsPathCommand
flash.display.GraphicsPathWinding
Method Detail

curveTo | () | method

`public function curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number):void`

Adds a new "curveTo" command to the `commands` vector and new coordinates to the `data` vector.

Parameters

| `controlX:Number` — The x coordinate of the point to which to draw a curve.
| `controlY:Number` — The y coordinate of the point to which to draw a curve.
| `anchorX:Number`
| `anchorY:Number`

See also

flash.display.GraphicsPathCommand.CURVE_TO

lineTo | () | method |

`public function lineTo(x:Number, y:Number):void`

Adds a new "lineTo" command to the `commands` vector and new coordinates to the `data` vector.

Parameters

| `x:Number` — The x coordinate of the point to which to draw a line.
| `y:Number` — The y coordinate of the point to which to draw a line.

See also

flash.display.GraphicsPathCommand.LINE_TO

moveTo | () | method |

`public function moveTo(x:Number, y:Number):void`

Adds a new "moveTo" command to the `commands` vector and new coordinates to the `data` vector.

Parameters

| `x:Number` — The x coordinate of the point to move to.
| `y:Number` — The y coordinate of the point to move to.

See also

flash.display.GraphicsPathCommand.MOVE_TO

wideLineTo | () | method |

`public function wideLineTo(x:Number, y:Number):void`

Adds a new "wideLineTo" command to the `commands` vector and new coordinates to the `data` vector.

Parameters

| `x:Number` — The x coordinate of the point to which to draw a line.
| `y:Number` — The y coordinate of the point to which to draw a line.

See also

flash.display.GraphicsPathCommand.WIDE_LINE_TO

wideMoveTo | () | method |

`public function wideMoveTo(x:Number, y:Number):void`

Adds a new "wideMoveTo" command to the `commands` vector and new coordinates to the `data` vector.

Parameters

| `x:Number` — The x coordinate of the point to move to.
| `y:Number` — The y coordinate of the point to move to.

See also

flash.display.GraphicsPathCommand.WIDE_MOVE_TO

Submit Feedback on LiveDocs
© 2004-2008 Adobe Systems Incorporated. All rights reserved.
Tue May 20 2008, 04:02 AM -07:00