svg-linearize
turn curved svg paths into paths with only line segments
var linearize = ;var loadsvg = ;;
methods
var linearize =
var nsvg = linearize(svg, opts)
Create a new svg, nsvg
from an existing svg
element.
Any curved paths in svg
will be converted to line segment paths.
Optionally specify:
opts.tolerance
- tolerance to feed into simplify-geometry, higher values mean fewer points. Default: 3.opts.segments
- number of points to sample each path. Default: 100.
install
With npm do:
npm install svg-linearize
license
MIT