Packageflash.display
Classpublic final class GraphicsPath
InheritanceGraphicsPath Inheritance 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
 PropertyDefined By
  commands : Vector
The Vector of drawing commands representing the path.
GraphicsPath
 Inheritedconstructor : 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
 Inheritedprototype : 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
 MethodDefined 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
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
Adds a new "lineTo" command to the commands vector and new coordinates to the data vector.
GraphicsPath
  
Adds a new "moveTo" command to the commands vector and new coordinates to the data vector.
GraphicsPath
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
  
Adds a new "wideLineTo" command to the commands vector and new coordinates to the data vector.
GraphicsPath
  
Adds a new "wideMoveTo" command to the commands vector and new coordinates to the data vector.
GraphicsPath
Property Detail
commandsproperty
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

dataproperty 
public var data:Vector

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

windingproperty 
public var winding:String

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

See also

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

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