This project is a simple web application for drawing and erasing on a canvas element using JavaScript. It allows users to select brush size, color, draw with a pen, or erase content with an eraser.
这个项目是一个简单的网页应用,使用JavaScript在画布元素上进行绘制和擦除。它允许用户选择画笔大小、颜色,用画笔绘制,或者使用橡皮擦擦除内容。
- Draw freehand on the canvas.
- Erase content with an eraser.
- Adjust brush size and color.
- Convert drawing to Canvas code.
功能:
- 在画布上自由绘制。
- 使用橡皮擦擦除内容。
- 调整画笔大小和颜色。
- 将绘制内容转换为Canvas代码。
- Open the HTML file in a web browser.
- Use the buttons to select drawing or erasing mode.
- Adjust brush size and color as desired.
- Draw or erase on the canvas.
- Optionally, convert the drawing to Canvas code.
使用方法:
- 在网络浏览器中打开HTML文件。
- 使用按钮选择绘制或擦除模式。
- 根据需要调整画笔大小和颜色。
- 在画布上进行绘制或擦除操作。
- 可选地,将绘制内容转换为Canvas代码。
This project is licensed under the MIT License - see the LICENSE file for details.
许可证
这个项目基于 MIT 许可证发布 - 查看 LICENSE 文件获取更多详情。
