Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/1computer1/canvas-writer

Wrapper for node-canvas to help with drawing text. https://www.npmjs.com/package/canvas-writer
https://github.com/1computer1/canvas-writer

Last synced: 6 days ago
JSON representation

Wrapper for node-canvas to help with drawing text. https://www.npmjs.com/package/canvas-writer

Awesome Lists containing this project

README

        

# canvas-writer
Wrapper for node-canvas to help with drawing text.

### Example
```js
const Canvas = require('canvas');
const CanvasWriter = require('canvas-writer');

let picture = new CanvasWriter(new Canvas(200, 200));

picture.write('Hello world! Text that will probably be wrapped onto the next lines because it\'s longer than that -> ', 100, {
font: '16px "Segoe UI"',
style: 'white'
});

console.log(picture.toString());
// Hello world!
// Text that will
// probably be
// wrapped onto
// the next lines
// because it's
// longer than
// that ->

picture.saveFile('./mypicture.png'); // You're done!
```

### Documentation
See the [Github wiki](https://github.com/1Computer1/canvas-writer/wiki) for documentation, changelog, and more.