Retrieve bounding box from svg path data.
const getBounds = require('svg-path-bounds')
let [left, top, right, bottom] = getBounds('M0 0L10 10 20 0Z')
Calculate bounding box for svg path data string or parsed path segments array. The box is detected by controlling points, not the real path.
- parse-svg-path - return svg path data segments
- abs-svg-path - convert svg path to absolute values
- rel-svg-path - convert svg path to relative values
- normalize-svg-path - make path consist of only bezier curve segments
- draw-svg-path - create canvas shape based on svg path data
- normalize-svg-coords - bring svg path coordinates to any linear range
MIT © Dima Yv