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[][]

Defined in

MutablePath.ts:10


currentPath

protected currentPath: Point[]

Defined in

MutablePath.ts:20

Accessors

subpaths

Get Signature

get subpaths(): Point[][]

The subpath that compose up the path

Returns

Point[][]

The subpath that compose up the path

Implementation of

M2Path.subpaths

Defined in

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.

Defined in

MutablePath.ts:43


clear()

clear(): void

Removes all subpaths from the shape.

Returns

void

Defined in

MutablePath.ts:50


duplicate()

duplicate(): MutablePath

Makes a deep copy.

Returns

MutablePath

a deep copy

Defined in

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

Defined in

MutablePath.ts:27