Language version: | ActionScript 3.0 |
A collection of drawing commands and the coordinate parameters for those commands.
Use a GraphicsPath object with the Graphics.drawGraphicsData()
method.
Drawing a GraphicsPath object is the equivalent of calling the Graphics.drawPath()
method.
The GraphicsPath class also has its own set of methods (curveTo()
, lineTo()
, moveTo()
wideLineTo()
and wideMoveTo()
) similar to those in the Graphics class
for making adjustments to the GraphicsPath.commands
and GraphicsPath.data
vector arrays.
public var commands:Vector.<int>
Language version: | ActionScript 3.0 |
The Vector of drawing commands as integers representing the path. Each command can be one of the values defined
by the GraphicsPathCommand class.
See also
public var data:Vector.<Number>
Language version: | ActionScript 3.0 |
The Vector of Numbers containing the parameters used with the drawing commands.
winding:String
[read-write]
Language version: | ActionScript 3.0 |
Specifies the winding rule using a value defined in the GraphicsPathWinding class.
Implementation
public function get winding():String
public function set winding(value:String):void
See also
public function GraphicsPath(commands:Vector.<int> = null, data:Vector.<Number> = null, winding:String = "evenOdd")
Language version: | ActionScript 3.0 |
Creates a new GraphicsPath object.
Parameters
| commands:Vector.<int> (default = null ) — A Vector of integers representing commands defined by the GraphicsPathCommand class.
|
|
| data:Vector.<Number> (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
public function cubicCurveTo(controlX1:Number, controlY1:Number, controlX2:Number, controlY2:Number, anchorX:Number, anchorY:Number):void
Language version: | ActionScript 3.0 |
Adds a new "cubicCurveTo" command to the commands
vector and
new coordinates to the data
vector.
Parameters
| controlX1:Number — A number that specifies the horizontal position of the first control
point relative to the registration point of the parent display object.
|
|
| controlY1:Number — A number that specifies the vertical position of the first control
point relative to the registration point of the parent display object.
|
|
| controlX2:Number — A number that specifies the horizontal position of the second control
point relative to the registration point of the parent display object.
|
|
| controlY2:Number — A number that specifies the vertical position of the second control
point relative to the registration point of the parent display object.
|
|
| anchorX:Number — A number that specifies the horizontal position of the next anchor
point relative to the registration point of the parent display object.
|
|
| anchorY:Number — A number that specifies the vertical position of the next anchor
point relative to the registration point of the parent display object.
|
See also
public function curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number):void
Language version: | ActionScript 3.0 |
Adds a new "curveTo" command to the commands
vector and
new coordinates to the data
vector.
Parameters
| controlX:Number — A number that specifies the horizontal position of the control
point relative to the registration point of the parent display object.
|
|
| controlY:Number — A number that specifies the vertical position of the control
point relative to the registration point of the parent display object.
|
|
| anchorX:Number — A number that specifies the horizontal position of the next anchor
point relative to the registration point of the parent display object.
|
|
| anchorY:Number — A number that specifies the vertical position of the next anchor
point relative to the registration point of the parent display object.
|
See also
public function lineTo(x:Number, y:Number):void
Language version: | ActionScript 3.0 |
Adds a new "lineTo" command to the commands
vector and
new coordinates to the data
vector.
Parameters
| x:Number — The x coordinate of the destination point for the line.
|
|
| y:Number — The y coordinate of the destination point for the line.
|
See also
public function moveTo(x:Number, y:Number):void
Language version: | ActionScript 3.0 |
Adds a new "moveTo" command to the commands
vector and
new coordinates to the data
vector.
Parameters
| x:Number — The x coordinate of the destination point.
|
|
| y:Number — The y coordinate of the destination point.
|
See also
public function wideLineTo(x:Number, y:Number):void
Language version: | ActionScript 3.0 |
Adds a new "wideLineTo" command to the commands
vector and
new coordinates to the data
vector.
Parameters
| x:Number — The x-coordinate of the destination point for the line.
|
|
| y:Number — The y-coordinate of the destination point for the line.
|
See also
public function wideMoveTo(x:Number, y:Number):void
Language version: | ActionScript 3.0 |
Adds a new "wideMoveTo" command to the commands
vector and
new coordinates to the data
vector.
Parameters
| x:Number — The x-coordinate of the destination point.
|
|
| y:Number — The y-coordinate of the destination point.
|
See also
© 2004-2022 Adobe Systems Incorporated. All rights reserved.
Mon Feb 26 2024, 5:22 PM GMT