Update README.md

This commit is contained in:
Preet
2017-01-12 00:35:28 -08:00
committed by GitHub
parent e31991d502
commit f94b5fc3cb

View File

@@ -14,12 +14,15 @@ The latest Rough.js release (beta version 0.1): [Download](./rough.zip)
## Setup
Initialize a **RoughCanvas** object by passing in the canvas node and the size of the canvas.
Following code snippet draws a rectangle.
```
```html
<script src="dist/rough.min.js"></script>
<canvas id="myCanvas"></canvas>
```
```javascript
var rough = new RoughCanvas(document.getElementById('myCanvas'), 500, 500);
rough.rectangle(10, 10, 200, 200);
```
## Drawing lines and shapes
### Filling