normalize.d.ts 557 B

12345678910111213
  1. /**
  2. * Converts provided SVG path data string into a normalized path data string.
  3. *
  4. * The normalization uses a restricted subset of path commands; all segments
  5. * are translated into lineto, curveto, moveto, and closepath segments.
  6. *
  7. * Relative path commands are changed into their absolute counterparts,
  8. * and chaining of coordinates is disallowed.
  9. *
  10. * The function will always return a valid path data string; if an input
  11. * string cannot be normalized, 'M 0 0' is returned.
  12. */
  13. export declare function normalizePathData(pathData: string): string;