Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

drawille-canvas-blessed-contrib

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drawille-canvas-blessed-contrib

HTML5 Canvas API for drawille

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 27 Feb 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc