UNPKG

@liammartens/svg-path-properties

Version:

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

13 lines (12 loc) 440 B
import { Properties, Point, PointProperties } from "./types"; export declare class LinearPosition implements Properties { private x0; private x1; private y0; private y1; constructor(x0: number, x1: number, y0: number, y1: number); getTotalLength: () => number; getPointAtLength: (pos: number) => Point; getTangentAtLength: (_: number) => Point; getPropertiesAtLength: (pos: number) => PointProperties; }