# draw-svg-path

> draw svg paths onto canvas contexts

Latest version **2.0.1** (published 2018-01-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install draw-svg-path
pnpm add draw-svg-path
yarn add draw-svg-path
bun add draw-svg-path
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2018-01-26 |
| First published | 2014-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21 |
| Author | Michael Rhodes |
| Maintainers | michaelrhodes |
| Keywords | svg, path, canvas |

## Links

- npm: https://www.npmjs.com/package/draw-svg-path
- Repository: https://github.com/michaelrhodes/draw-svg-path
- Homepage: https://github.com/michaelrhodes/draw-svg-path#readme
- Issues: https://github.com/michaelrhodes/draw-svg-path/issues
- npm.io page: https://npm.io/package/draw-svg-path

## Dependencies (3)

- [abs-svg-path](https://npm.io/package/abs-svg-path.md) ~0.1.1
- [parse-svg-path](https://npm.io/package/parse-svg-path.md) ~0.1.2
- [curvify-svg-path](https://npm.io/package/curvify-svg-path.md) ~1.0.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 2.0.1 (latest) — 2018-01-26
- 2.0.0 — 2018-01-26
- 1.0.0 — 2014-04-29

## README

# draw-svg-path
draw svg paths onto canvas contexts

## install
```sh
$ npm install michaelrhodes/draw-svg-path#2.0.1
```

## use
``` js
var draw = require('draw-svg-path')
var parse = require('parse-svg-path')

var canvas = document.createElement('canvas')
var ctx = canvas.getContext('2d')

ctx.beginPath()
ctx.lineWidth = 1
ctx.strokeStyle = '#000000'
ctx.fillStyle = 'transparent'

// Accepts /^(un)?parsed$/ paths
draw(ctx, parse('M20 20 L25 25'))
draw(ctx, 'M10 10 L15 15')

ctx.stroke()
ctx.closePath()

document.body.appendChild(canvas)
```

## obey
[MIT](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/draw-svg-path · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
