Socket
Socket
Sign inDemoInstall

draw-svg-path

Package Overview
Dependencies
3
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    draw-svg-path

draw svg paths onto canvas contexts


Version published
Weekly downloads
225K
increased by6.86%
Maintainers
1
Install size
22.3 kB
Created
Weekly downloads
 

Readme

Source

draw-svg-path

draw svg paths onto canvas contexts

install

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

use

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

Keywords

FAQs

Last updated on 26 Jan 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc