# drawille-canvas-blessed-contrib

> HTML5 Canvas API for drawille

Latest version **0.1.3** (published 2016-02-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install drawille-canvas-blessed-contrib
pnpm add drawille-canvas-blessed-contrib
yarn add drawille-canvas-blessed-contrib
bun add drawille-canvas-blessed-contrib
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2016-02-27 |
| First published | 2015-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 389 |
| Author | Bence Dányi |
| Maintainers | yaron |
| Keywords | drawille, canvas |

## Links

- npm: https://www.npmjs.com/package/drawille-canvas-blessed-contrib
- Repository: https://github.com/madbence/node-drawille-canvas
- Issues: https://github.com/madbence/node-drawille-canvas/issues
- npm.io page: https://npm.io/package/drawille-canvas-blessed-contrib

## Dependencies (5)

- [x256](https://npm.io/package/x256.md) >=0.0.1
- [ansi-term](https://npm.io/package/ansi-term.md) >=0.0.2
- [bresenham](https://npm.io/package/bresenham.md) 0.0.3
- [gl-matrix](https://npm.io/package/gl-matrix.md) ^2.1.0
- [drawille-blessed-contrib](https://npm.io/package/drawille-blessed-contrib.md) >=0.0.1

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2016-02-27
- 0.1.2 — 2015-01-13
- 0.1.1 — 2015-01-13
- 0.1.0 — 2015-01-13

## README

# drawille-canvas

![anim](anim.gif)

HTML5 Canvas API for [`drawille`](https://github.com/madbence/node-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](example.js), check out in the console (`node example`) or in the [browser](http://madbence.github.io/node-drawille-canvas/) (`example.html`).

## API

### new Canvas(width, height)

Creates a new `Canvas` with the given dimensions.
For method details, see [`CanvasRenderingContext2D` on MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D)

### 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

---
_Source: https://npm.io/package/drawille-canvas-blessed-contrib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
