svg-path-d
Version:
SVG path data (path[d] attribute content) manipulation library.
13 lines (12 loc) • 771 B
TypeScript
import { DrawTo } from './command';
import { PathNode } from './path-node';
export declare function getParams(item: Readonly<DrawTo>, buf: number[]): void;
export declare function formatParams(item: Readonly<DrawTo>, x0: number, y0: number, fractionDigits: number): string;
/**
* Returns a string representing the draw command in absolute form.
* @param item SVG path single draw command
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
*/
export declare function asString(item: Readonly<DrawTo>, fractionDigits?: number): string;
export declare function asRelativeString(item: Readonly<PathNode>, fractionDigits?: number): string;
export declare function fromString(pathData: string): PathNode[];