svg-path-bounds
Get bounding box of an svg path data
Last updated 8 years ago by dfcreative .
MIT · Repository · Bugs · Original npm
$ cnpm install svg-path-bounds 
SYNC missed versions from official npm registry.

svg-path-bounds Build Status

Retrieve bounding box from svg path data.

Usage

npm install svg-path-bounds

const getBounds = require('svg-path-bounds')

let [left, top, right, bottom] = getBounds('M0 0L10 10 20 0Z')

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

Similar

License

MIT © Dima Yv

Current Tags

  • 1.0.1                                ...           latest (8 years ago)

1 Versions

  • 1.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org