The goal is to implement a canvas drawing board library with Javascript
<div class="drawing-board-box">
<canvas id="board" width="500" height="300"></canvas>
</div>
...
var oBoard = document.getElementById('board');
new DrawingBoard(oBoard, options?);
Param | type | Available value |
---|---|---|
currentTool | string | 'pencil', 'text', 'rect', 'line', 'eraser' |
size | number | 1,2,3,... |
zoom | number | between 0 and 2, excluding 0 |
color | string | something like that: '#000' or 'black' or 'rgb(0, 0, 0)' |
fillColor | string |
- Pencil
- Line
- Eraser
- Rect
- Text
- Ellipse
- Image
- ...
- setTool
- setSize
- setColor
- setFillColoe
- redo
- undo
- clear
- zoom
- move
- ...
Please click here
MIT