Skip to content

The goal is to implement a canvas drawing board library with Javascript

License

Notifications You must be signed in to change notification settings

yeesho/drawingBoard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

drawingBoard

The goal is to implement a canvas drawing board library with Javascript

Use

  <div class="drawing-board-box">
    <canvas id="board" width="500" height="300"></canvas>
  </div>
  ...

  var oBoard = document.getElementById('board');
  new DrawingBoard(oBoard, options?);

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

Tools

  • Pencil
  • Line
  • Eraser
  • Rect
  • Text
  • Ellipse
  • Image
  • ...

Methods

  • setTool
  • setSize
  • setColor
  • setFillColoe
  • redo
  • undo
  • clear
  • zoom
  • move
  • ...

Demo

Please click here

demo

License

MIT

About

The goal is to implement a canvas drawing board library with Javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published