Path
class Path
Shape extension for Graphics
Constructor
new Path() → {}
Initializes the path with zero contours and a non-zero fill rule.
Summary
Properties from Path
| unknown |
The list of contours of this path, where a contour is a list of points. |
| FILL_RULE |
The fill rule of this path. |
| number[] |
Gets the points of the last contour in this path. If there are no contours, one is created. |
| number |
The type of shape. This is always equal to 100 for now. |
| PIXI.Bounds |
The calculated bounds of this path. |
| boolean |
Whether the calculated bounds are dirty. |
Methods from Path
| Path |
Clone this path. |
| void |
Closes the last contour of this path and pushes a new one. |
| boolean |
Calculates whether the point (x, y) is inside this path or not. |
| void |
This should be called when the path is updated so that the hit-testing bounds are recalculated. |
Public Properties
contours: unknown
The list of contours of this path, where a contour is a list of points.
points: number[]
Gets the points of the last contour in this path. If there are no contours, one is created.
Protected Properties
Public Methods
closeContour() → {void}
Closes the last contour of this path and pushes a new one.
| Type | Description |
|---|---|
| void |
contains(x: number, y: number) → {boolean}
Calculates whether the point (x, y) is inside this path or not.
| Name | Type | Description |
|---|---|---|
| x | number |
The x-coordinate of the point. |
| y | number |
The y-coordinate of the point. |
| Type | Description |
|---|---|
| boolean |
Whether (x, y) is inside this path. |
invalidate() → {void}
This should be called when the path is updated so that the hit-testing bounds are recalculated.
| Type | Description |
|---|---|
| void |