rel-svg-path

0.1.1 • Public • Published

rel-svg-path

Define a path using only relative points. Most SVG drawing tools will export paths using absolute points though it can be nicer to tweak them manually when all the points are relative.

Programatic Usage

With your favourite package manager:

  • packin: packin add jkroso/rel-svg-path
  • component: component install jkroso/rel-svg-path
  • npm: npm install rel-svg-path

then in you code:

var rel = require('rel-svg-path')
rel([['M',10,20],['L',50, 40]]) // => [['m',10,20],['l',40,20]]

Command line usage

Installation:

git clone https://github.com/jkroso/rel-svg-path.git
cd rel-svg-path
make install

Then just pipe path data to it:

echo "M10 20 50 40" | rel-svg-path

Running the tests

Just run make and navigate your browser to test/index.html

Readme

Keywords

Package Sidebar

Install

npm i rel-svg-path

Weekly Downloads

75

Version

0.1.1

License

MIT

Last publish

Collaborators

  • jkroso