normalize-svg-path

WebJar for normalize-svg-path

License

License

MIT
Categories

Categories

ORM Data
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

normalize-svg-path
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

normalize-svg-path
WebJar for normalize-svg-path
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/jkroso/normalize-svg-path

Download normalize-svg-path

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : svg-arc-to-cubic-bezier jar [3.0.0,4)

Project Modules

There are no modules declared in this project.

normalize-svg-path build

Convert all segments in a path to curves. Usefull if you intend to animate one shape to another. By defining all segments with curves instead of a mix of lines, arcs, and curves tweening becomes much simpler. It could also help you rewrite your SVG code according to the principles of narcissistic design.

Usage

npm install normalize-svg-path

import parse from 'parse-svg-path'
import abs from 'abs-svg-path'
import normalize from 'normalize-svg-path'

const segments = normalize(abs(parse('M0 0L10 10A10 10 0 0 0 20 20Z')))

API

normalize(path)

Translate each segment in path to an equivalent cubic bézier curve. The input path must be absolute.

normalize([['L',1,2]]) // => [['C',0,0,1,2,1,2]]

Versions

Version
1.1.0
1.0.1
0.1.0