Package Exports
- svg-path-bounds
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (svg-path-bounds) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
svg-path-bounds 
Retrieve bounding box from svg path data.
Usage
const getBounds = require('svg-path-bounds')
let [left, top, right, bottom] = getBounds('M0 0L10 10 20 0Z') // [0, 0, 20, 10]API
bounds = getBounds(path|segments)
Calculate bounding box for svg path data string or parsed path segments array. The box is detected by controlling points, not the real path.
Related
- 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
Similar
License
MIT © Dima Yv
