Skip to content

在线画板,基于 Canvas 和 JavaScript 的画图工具。

Notifications You must be signed in to change notification settings

ding-ke/drawing-board

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Drawing Board

Description

Preview

Click here to preview

Usage

<canvas id="my-board"></canvas>
// Instantiation �a drawing board object
const board = new DrawBoard({
	element: 'my-board',
	width: 200,
	height: 200,
	color: 'red',
	lineWidth: 5,
});
// Using the tools of circle
board.useCircel();
// Setting color 
board.setColor('#666');
// Setting width
board.setLineWidth(10);
// Saving the picture into your file system
board.download('picture');

ALL API

const board = new DrawBoard({});

board.setColor();
board.setLineWidth();
board.clearAll();
board.usePenTool();
board.useLineTool();
board.useCircleTool();
board.useEraser();
board.backspace();
board.download();

About

在线画板,基于 Canvas 和 JavaScript 的画图工具。

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published