Skip to main content

Class: PathParser

Hierarchy​

  • SVGPathData

    ↳ PathParser

Constructors​

constructor​

• new PathParser(path)

Parameters​

NameType
pathstring

Overrides​

SVGPathData.constructor

Defined in​

src/PathParser.ts:41

Properties​

control​

• control: Point

Defined in​

src/PathParser.ts:31


start​

• start: Point

Defined in​

src/PathParser.ts:32


current​

• current: Point

Defined in​

src/PathParser.ts:33


command​

• command: Command = null

Defined in​

src/PathParser.ts:34


commands​

• Readonly commands: Command[]

Overrides​

SVGPathData.commands

Defined in​

src/PathParser.ts:35


i​

• Private i: number = -1

Defined in​

src/PathParser.ts:36


previousCommand​

• Private previousCommand: Command = null

Defined in​

src/PathParser.ts:37


points​

• Private points: Point[] = []

Defined in​

src/PathParser.ts:38


angles​

• Private angles: number[] = []

Defined in​

src/PathParser.ts:39

Methods​

reset​

â–¸ reset(): void

Returns​

void

Defined in​

src/PathParser.ts:51


isEnd​

â–¸ isEnd(): boolean

Returns​

boolean

Defined in​

src/PathParser.ts:62


next​

â–¸ next(): Command

Returns​

Command

Defined in​

src/PathParser.ts:71


getPoint​

â–¸ getPoint(xProp?, yProp?): Point

Parameters​

NameTypeDefault value
xPropstring'x'
yPropstring'y'

Returns​

Point

Defined in​

src/PathParser.ts:80


getAsControlPoint​

â–¸ getAsControlPoint(xProp?, yProp?): Point

Parameters​

NameType
xProp?string
yProp?string

Returns​

Point

Defined in​

src/PathParser.ts:89


getAsCurrentPoint​

â–¸ getAsCurrentPoint(xProp?, yProp?): Point

Parameters​

NameType
xProp?string
yProp?string

Returns​

Point

Defined in​

src/PathParser.ts:97


getReflectedControlPoint​

â–¸ getReflectedControlPoint(): Point

Returns​

Point

Defined in​

src/PathParser.ts:105


makeAbsolute​

â–¸ makeAbsolute(point): Point

Parameters​

NameType
pointPoint

Returns​

Point

Defined in​

src/PathParser.ts:132


addMarker​

â–¸ addMarker(point, from?, priorTo?): void

Parameters​

NameType
pointPoint
from?Point
priorTo?Point

Returns​

void

Defined in​

src/PathParser.ts:146


addMarkerAngle​

â–¸ addMarkerAngle(point, angle): void

Parameters​

NameType
pointPoint
anglenumber

Returns​

void

Defined in​

src/PathParser.ts:160


getMarkerPoints​

â–¸ getMarkerPoints(): Point[]

Returns​

Point[]

Defined in​

src/PathParser.ts:165


getMarkerAngles​

â–¸ getMarkerAngles(): number[]

Returns​

number[]

Defined in​

src/PathParser.ts:169