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.

### Hierarchy

- GraphicsPath

### Implements

- IGraphicsData
- IGraphicsPath

## Index

### Constructors

- constructor

### Properties

- commands
- data
- winding

### Methods

- cubicCurveTo
- curveTo
- lineTo
- moveTo
- wideLineTo
- wideMoveTo

## Constructors

### constructor

- new GraphicsPath(commands?: Vector<number>, data?: Vector<number>, winding?: GraphicsPathWinding): GraphicsPath

- - Defined in lib/openfl/display/GraphicsPath.d.ts:45

  Creates a new GraphicsPath object.

  #### Parameters

  - ##### Optional commands: Vector<number>

  - ##### Optional data: Vector<number>

  - ##### Optional winding: GraphicsPathWinding

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

  #### Returns GraphicsPath

## Properties

### commands

commands: Vector<number>

- Defined in lib/openfl/display/GraphicsPath.d.ts:33

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

### data

data: Vector<number>

- Defined in lib/openfl/display/GraphicsPath.d.ts:39

The Vector of Numbers containing the parameters used with the drawing commands.

### winding

winding: GraphicsPathWinding

- Defined in lib/openfl/display/GraphicsPath.d.ts:45

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

## Methods

### cubicCurveTo

- cubicCurveTo(controlX1: number, controlY1: number, controlX2: number, controlY2: number, anchorX: number, anchorY: number): void

- - Defined in lib/openfl/display/GraphicsPath.d.ts:57

  #### Parameters

  - ##### controlX1: number

  - ##### controlY1: number

  - ##### controlX2: number

  - ##### controlY2: number

  - ##### anchorX: number

  - ##### anchorY: number

  #### Returns void

### curveTo

- curveTo(controlX: number, controlY: number, anchorX: number, anchorY: number): void

- - Defined in lib/openfl/display/GraphicsPath.d.ts:76

  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.

  #### Returns void

### lineTo

- lineTo(x: number, y: number): void

- - Defined in lib/openfl/display/GraphicsPath.d.ts:86

  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.

  #### Returns void

### moveTo

- moveTo(x: number, y: number): void

- - Defined in lib/openfl/display/GraphicsPath.d.ts:96

  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.

  #### Returns void

### wideLineTo

- wideLineTo(x: number, y: number): void

- - Defined in lib/openfl/display/GraphicsPath.d.ts:106

  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.

  #### Returns void

### wideMoveTo

- wideMoveTo(x: number, y: number): void

- - Defined in lib/openfl/display/GraphicsPath.d.ts:116

  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.

  #### Returns void

Generated using TypeDoc