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

https://github.com/arhea/brushjs

Provides a single API for drawing Canvas or SVG elements.
https://github.com/arhea/brushjs

Last synced: about 1 year ago
JSON representation

Provides a single API for drawing Canvas or SVG elements.

Awesome Lists containing this project

README

          

# BrushJS
BrushJS provides a single API for drawing on the canvas as well as writing to SVG.

## Example

```html
Your browser does not support canvas.


```

```javascript
var ctx = new Brush( "#SVG" );
ctx.fillStyle = "#333333";
ctx.font = "20px sans-serif";
ctx.fillText( "Sample Text" , 300 , 300 );

document.getElementById( "xml" ).innerHTML = ctx.toDataURL( "image/svg+xml" );
```