Socket
Book a DemoInstallSign in
Socket

sketch

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sketch

Sketch canvas drawing component

latest
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

Sketch

Turn a canvas into a sketch pad.

js canvas sketch

Installation

$ component install component/sketch

API

sketch(canvas)

Turn the given canvas into a sketch pad.

var sketch = require('sketch');
sketch(canvas);

Sketch#add(object)

Add drawable object that must provide a .draw(ctx) method.

Sketch#size(n)

Set pen size.

Sketch#color(string)

Set pen color.

Sketch#opacity(n)

Set pen opacity.

Sketch#clear()

Clear the objects and re-draw.

Sketch#reset()

Reset the sketch defaults and clear the canvas.

License

MIT

Keywords

canvas

FAQs

Package last updated on 21 Aug 2013

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