Skip to content

hughsk/svg-line-step

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

svg-line-step

Generate the path attribute for a stepped SVG line:

svg-line-step

Usage

NPM

path = step(x1, y1, x2, y2)

Returns a path attribute for the line between (x1, y1) and (x2, y2).

For example:

var createSVG = require('svg-create-element')
var step = require('svg-line-step')
var path = createSVG('path')

path.setAttribute('d', step(0, 0, 100, 100))

License

MIT. See LICENSE.md for details.

About

Generate the path attribute for a stepped SVG line.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published