Socket
Socket
Sign inDemoInstall

drawille-canvas-blessed-contrib

Package Overview
Dependencies
5
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    drawille-canvas-blessed-contrib

HTML5 Canvas API for drawille


Version published
Weekly downloads
56K
increased by1.42%
Maintainers
1
Install size
2.93 MB
Created
Weekly downloads
 

Readme

Source

drawille-canvas

anim

HTML5 Canvas API for drawille.

Install

$ npm install drawille-canvas

In node v0.10 it's a bit slow, with node v0.11 it runs very smoothly.

Usage

See example, check out in the console (node example) or in the browser (example.html).

API

new Canvas(width, height)

Creates a new Canvas with the given dimensions. For method details, see CanvasRenderingContext2D on MDN

c.fillRect(x, y, w, h)

Fills the given area of the canvas.

c.clearRect(x, y, w, h)

Clears the given area of the canvas.

c.save()

Save the current transformation matrix on the stack.

c.restore()

Restore the last transformation matrix.

c.translate(x, y)

Translate the current transformation matrix.

c.rotate(a)

Rotate the current transformation matrix with the given angles.

c.scale(x, y)

Scale the current transformation matrix.

c.beginPath()

Start a new path.

c.closePath()

Close the current path.

c.moveTo(x, y)

Moves the starting point of the next segment to the given coordinates.

c.lineTo(x, y)

Connects the starting point with the given point with a straight line.

c.stroke()

Stroke the current path.

TODO

  • add .fill to fill paths
  • add .arc, .arcTo

License

MIT

Keywords

FAQs

Last updated on 27 Feb 2016

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