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
contours

The list of contours of this path, where a contour is a list of points.

FILL_RULE
fillRule

The fill rule of this path.

number[]
points

Gets the points of the last contour in this path. If there are no contours, one is created.

number
type

The type of shape. This is always equal to 100 for now.

PIXI.Bounds
protected bounds

The calculated bounds of this path.

boolean
protected dirty

Whether the calculated bounds are dirty.

Methods from Path

Path
clone()

Clone this path.

void
closeContour()

Closes the last contour of this path and pushes a new one.

boolean
contains(x: number, y: number)

Calculates whether the point (x, y) is inside this path or not.

void
invalidate()

This should be called when the path is updated so that the hit-testing bounds are recalculated.

Public Properties


contours Path.ts:29
contours: unknown

The list of contours of this path, where a contour is a list of points.

fillRule Path.ts:36
fillRule: FILL_RULE

The fill rule of this path.

points Path.ts:59
points: number[]

Gets the points of the last contour in this path. If there are no contours, one is created.

type Path.ts:39
type: number

The type of shape. This is always equal to 100 for now.

Protected Properties


bounds Path.ts:45
protected bounds: PIXI.Bounds

The calculated bounds of this path.

dirty Path.ts:42
protected dirty: boolean

Whether the calculated bounds are dirty.

Public Methods


clone Path.ts:107
clone() → {Path}

Clone this path.

Returns:
Type Description
Path
closeContour Path.ts:121
closeContour() → {void}

Closes the last contour of this path and pushes a new one.

Returns:
Type Description
void
contains Path.ts:72
contains(x: number, y: number) → {boolean}

Calculates whether the point (x, y) is inside this path or not.

Parameters:
Name Type Description
x number

The x-coordinate of the point.

y number

The y-coordinate of the point.

Returns:
Type Description
boolean

Whether (x, y) is inside this path.

invalidate Path.ts:134
invalidate() → {void}

This should be called when the path is updated so that the hit-testing bounds are recalculated.

Returns:
Type Description
void

Powered by webdoc!