svg-path-bounds

WebJar for svg-path-bounds

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

svg-path-bounds
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

svg-path-bounds
WebJar for svg-path-bounds
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/dfcreative/svg-path-bounds

Download svg-path-bounds

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/svg-path-bounds/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>svg-path-bounds</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/svg-path-bounds/
implementation 'org.webjars.npm:svg-path-bounds:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/svg-path-bounds/
implementation ("org.webjars.npm:svg-path-bounds:1.0.1")
'org.webjars.npm:svg-path-bounds:jar:1.0.1'
<dependency org="org.webjars.npm" name="svg-path-bounds" rev="1.0.1">
  <artifact name="svg-path-bounds" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='svg-path-bounds', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "svg-path-bounds" % "1.0.1"
[org.webjars.npm/svg-path-bounds "1.0.1"]

Dependencies

compile (4)

Group / Artifact Type Version
org.webjars.npm : abs-svg-path jar [0.1.1,0.2)
org.webjars.npm : is-svg-path jar [1.0.1,2)
org.webjars.npm : normalize-svg-path jar [1.0.0,2)
org.webjars.npm : parse-svg-path jar [0.1.2,0.2)

Project Modules

There are no modules declared in this project.

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') // [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

Similar

License

MIT © Dima Yv

Versions

Version
1.0.1