Path
SVG path parsing, transforms, analysis, and corner rounding. All functions operate on SVG path d-attribute strings.
Parsing
- parsePath — Parse an SVG path string into structured path data.
- toSvgPath — Convert structured path data back to an SVG path string.
Transforms
- reversePath — Reverse path winding direction.
- translatePath — Move a path by dx/dy offset.
- scalePath — Scale a path uniformly from the origin.
- scalePathXY — Scale with separate x and y factors.
- scalePathAround — Scale uniformly around a center point.
- rotatePath — Rotate a path around the origin.
- rotatePathAround — Rotate a path around a specific point.
- reflectX — Mirror a path across the Y axis.
- reflectXAround — Mirror across a vertical axis at a given x.
- reflectY — Mirror a path across the X axis.
- reflectYAround — Mirror across a horizontal axis at a given y.
Analysis
- pathLength — Get the total arc length of a path.
- pointAtDistance — Get the x/y point at a given distance along a path.
- pointAndTangentAtDistance — Get the point and tangent angle at a given distance.
- extractSkeleton — Extract corner points from a path.
- boundingBox — Get the axis-aligned bounding box of a path.
Modification
- reroundPath — Rebuild a path with new corner radii using bezier approximation.
- reroundPathWithArcs — Round corners with true SVG arc commands.
- reroundPathWithDualRadii — Round with different radii for convex and concave corners.