Skip to main content

Class: MutablePath

Subpaths and methods for creating them.

Remarks

Subpaths are an array of lines that are drawn together.

Extended by

Implements

Constructors

new MutablePath()

new MutablePath(): MutablePath

Returns

MutablePath

Properties

_subpaths

_subpaths: Point[][]

Source

MutablePath.ts:10


currentPath

protected currentPath: Point[]

Source

MutablePath.ts:20

Accessors

subpaths

get subpaths(): Point[][]

The subpath that compose up the path

Returns

Point[][]

Source

MutablePath.ts:12

Methods

addLine()

addLine(point): void

Adds a straight line to the current subpath.

Parameters

point: Point

location where the line will end

Returns

void

Remarks

The line is added from the last point in the current subpath to the given point.

Source

MutablePath.ts:43


clear()

clear(): void

Removes all subpaths from the shape.

Returns

void

Source

MutablePath.ts:50


duplicate()

duplicate(): MutablePath

Makes a deep copy.

Returns

MutablePath

a deep copy

Source

MutablePath.ts:60


move()

move(point): void

Starts a new subpath at a given point.

Parameters

point: Point

location at which to start the new subpath

Returns

void

Source

MutablePath.ts:27