Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SVGPathData
    • PathParser

Index

Constructors

constructor

Properties

Private angles

angles: number[] = []

command

command: Command = null

Readonly commands

commands: Command[] = this.commands

control

control: Point = null

current

current: Point = null

Private i

i: number = -1

Private points

points: Point[] = []

Private previousCommand

previousCommand: Command = null

start

start: Point = null

Static Readonly ARC

ARC: 512

Static Readonly CLOSE_PATH

CLOSE_PATH: 1

Static Readonly CURVE_TO

CURVE_TO: 32

Static Readonly DRAWING_COMMANDS

DRAWING_COMMANDS: number

Static Readonly HORIZ_LINE_TO

HORIZ_LINE_TO: 4

Static Readonly LINE_COMMANDS

LINE_COMMANDS: number

Static Readonly LINE_TO

LINE_TO: 16

Static Readonly MOVE_TO

MOVE_TO: 2

Static Readonly QUAD_TO

QUAD_TO: 128

Static Readonly SMOOTH_CURVE_TO

SMOOTH_CURVE_TO: 64

Static Readonly SMOOTH_QUAD_TO

SMOOTH_QUAD_TO: 256

Static Readonly VERT_LINE_TO

VERT_LINE_TO: 8

Methods

aToC

  • aToC(): this
  • Returns this

addMarker

addMarkerAngle

  • addMarkerAngle(point: Point, angle: number): void

annotateArcs

  • annotateArcs(): this
  • Returns this

encode

  • encode(): string
  • Returns string

getAsControlPoint

  • getAsControlPoint(xProp?: string, yProp?: string): Point

getAsCurrentPoint

  • getAsCurrentPoint(xProp?: string, yProp?: string): Point

getBounds

  • getBounds(): (input: SVGCommand) => SVGCommand | SVGCommand[] & { maxX: number; maxY: number; minX: number; minY: number }
  • Returns (input: SVGCommand) => SVGCommand | SVGCommand[] & { maxX: number; maxY: number; minX: number; minY: number }

getMarkerAngles

  • getMarkerAngles(): number[]

getMarkerPoints

  • getMarkerPoints(): Point[]

getPoint

  • getPoint(xProp?: string, yProp?: string): Point
  • Parameters

    • Default value xProp: string = "x"
    • Default value yProp: string = "y"

    Returns Point

getReflectedControlPoint

  • getReflectedControlPoint(): Point

isEnd

  • isEnd(): boolean

makeAbsolute

matrix

  • matrix(a: number, b: number, c: number, d: number, e: number, f: number): this
  • Parameters

    • a: number
    • b: number
    • c: number
    • d: number
    • e: number
    • f: number

    Returns this

next

normalizeHVZ

  • normalizeHVZ(a?: boolean, b?: boolean, c?: boolean): this
  • Parameters

    • Optional a: boolean
    • Optional b: boolean
    • Optional c: boolean

    Returns this

normalizeST

  • normalizeST(): this
  • Returns this

qtToC

  • qtToC(): this
  • Returns this

reset

  • reset(): void

rotate

  • rotate(a: number, x?: number, y?: number): this
  • Parameters

    • a: number
    • Optional x: number
    • Optional y: number

    Returns this

round

  • round(x?: number): this
  • Parameters

    • Optional x: number

    Returns this

sanitize

  • sanitize(eps?: number): this
  • Parameters

    • Optional eps: number

    Returns this

scale

  • scale(x: number, y?: number): this
  • Parameters

    • x: number
    • Optional y: number

    Returns this

skewX

  • skewX(a: number): this
  • Parameters

    • a: number

    Returns this

skewY

  • skewY(a: number): this
  • Parameters

    • a: number

    Returns this

toAbs

  • toAbs(): this
  • Returns this

toRel

  • toRel(): this
  • Returns this

transform

  • transform(transformFunction: (input: SVGCommand) => SVGCommand | SVGCommand[]): this
  • Parameters

    • transformFunction: (input: SVGCommand) => SVGCommand | SVGCommand[]
        • (input: SVGCommand): SVGCommand | SVGCommand[]
        • Parameters

          • input: SVGCommand

          Returns SVGCommand | SVGCommand[]

    Returns this

translate

  • translate(x: number, y?: number): this
  • Parameters

    • x: number
    • Optional y: number

    Returns this

xSymmetry

  • xSymmetry(xOffset?: number): this
  • Parameters

    • Optional xOffset: number

    Returns this

ySymmetry

  • ySymmetry(yOffset?: number): this
  • Parameters

    • Optional yOffset: number

    Returns this

Static encode

  • encode(commands: SVGCommand[]): string
  • Parameters

    • commands: SVGCommand[]

    Returns string

Static parse

  • parse(path: string): SVGCommand[]
  • Parameters

    • path: string

    Returns SVGCommand[]

Generated using TypeDoc