UNPKG

@liammartens/svg-path-properties

Version:

Calculate the length for an SVG path, to use it with node or a Canvas element

15 lines (14 loc) 596 B
import { Properties, PartProperties, Point } from "./types"; export default class SVGPathProperties implements Properties { private length; private partial_lengths; private functions; private initial_point; constructor(source: string | [string, ...Array<number>][]); private getPartAtLength; getTotalLength: () => number; getPointAtLength: (fractionLength: number) => Point; getTangentAtLength: (fractionLength: number) => Point; getPropertiesAtLength: (fractionLength: number) => import("./types").PointProperties; getParts: () => PartProperties[]; }