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

  • Get the tangent's end point at the start point of this segment.

    Returns Vertex

    The end point of the starting point's tangent.

    Method

    getStartTangent

    Memberof

    PathSegment

Generated using TypeDoc