canvas-handle

0.1.0 • Public • Published

Canvas methods enhance

How to use

  1. get canvas ctx and add enhance methods to ctx
    var canvas = document.getElementById('canvas')
    var ctx = canvas.getContext('2d')
    ctx = new canvasHandle(ctx)
  1. use provide methods
    ctx.strokeRoundRect(10,10,100,100,2,'#f00',[20,20,20,20])
    ctx.fillRoundRect(10,10,100,100,'#f00',[20,20,20,20])

Readme

Keywords

Package Sidebar

Install

npm i canvas-handle

Weekly Downloads

0

Version

0.1.0

License

ISC

Unpacked Size

75.7 kB

Total Files

10

Last publish

Collaborators

  • alixw