All Projects → dy → svg-path-bounds

dy / svg-path-bounds

Licence: other
Get boundary box of svg path data

Programming Languages

javascript
184084 projects - #8 most used programming language

svg-path-bounds Build Status

Retrieve bounding box from svg path data.

npm install svg-path-bounds

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

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

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 © Dmitry Iv.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].