A common interface for different kinds of path segments.

interface PathSegment {
    clone: (() => PathSegment);
    reverse: (() => PathSegment);
    getEndPoint(): Vertex;
    getEndTangent(): Vertex;
    getStartPoint(): Vertex;
    getStartTangent(): Vertex;
}

Hierarchy (view full)

Implemented by

Properties

clone: (() => PathSegment)

Create a deep clone of this path segment.

Type declaration

Method

clone

Memberof

PathSegment

Returns

A deep clone/copy of this path segment.

reverse: (() => PathSegment)

Revserse this path segment (in-place) and return this same instance (useful for chaining). The new path segment has start and end point swapped.

Type declaration

Method

reverse

Memberof

PathSegment

Returns

This path segment instance (for chaining).

Methods