摘要
通过比较SVG和Canvas两种绘图机制,辨析了使用Canvas在网页中绘图方案的优缺点。使用一个在线写字本案例,论述了Canvas捕获用户的鼠标事件根据用户输入来绘图的过程。最后总结了Canvas绘图的特性以及应用前景。
By comparing two different drawing mechanisms between the SVG and the Canvas, the merits and drawbacks of Canvas scheme drawing pictures on web page are analyzed. With the example of notebook on Windows, the process of drawing picture through catching the user's input and mouse events is discussed. The features and application prospect of Canvas drawing scheme are summarized.
出处
《计算机时代》
2014年第8期17-18,21,共3页
Computer Era