7

I would like to do a a web Paint program. Basically I would like to mimic the Windows Paint program in a web application.

The features that I don't really know how to implement are:

  1. the drawing of 2D shapes (line, circle, etc) in a web browser
  2. drag and drop
  3. resize dynamically (seeing preview as you are moving the mouse for resizing)

I am guessing there will be HTML5, CSS3 and Javascript. I am mainly wondering if there are Javascript libraries that I could use to make my life easier.

Best regards

4

1 回答 1

4

是的,您想使用画布(“新闪光灯”)。它是一种在较新的(移动)浏览器中广泛支持的 HTML5 元素。

以下是一些帮助您入门的链接:
从存档中抢救的完整 ms-paint 副本(我能找到的最后一个)
http://mudcu.be/sketchpad/
http://dev.opera.com/articles/view/ html5-canvas-painting/
http://www.codeproject.com/Articles/355230/HTML-5-Canvas-A-Simple-Paint-Program-Touch-and-Mou

一些流行的库是:
fabric.jsKineticJSProcessing.js

祝你好运!

于 2013-04-18T21:11:56.143 回答