Draw! jQuery drawing plugin. 介绍
This plugin was created after noticing Walter Zorn’s javascript for drawing
shapes on screen with div’s.
I’ve also looked into the drawlibrary plugin, but it has a little too much
overhead. Drawlibrary does use the same algorithms as Walter Zorns work as
well, but relies on svg files when using Microsoft I.E. This plugin does not.
Here is some example code:
$("#myCanvas").drawRect(10, 10, 20, 20, {color:'blue', alpha: .5}); $("#myCanvas").drawpolygon([100, 100, 90, 30], [20, 30, 40, 60], {color:'#00FF00', alpha: .9}); $("#myCanvas").drawEllipse(100, 200, 40, 40, {color:'orange', stroke: 10}); $("#myCanvas").fillArc(50, 200, 40, 40, 90.0, 180.0, {color:'#336699', alpha: .2}); $("#myCanvas").fillpolygon([150, 300, 90, 30], [20, 30, 40, 60], {color:'yellow', alpha: 1});
My canvas is an empty div tag with id=”myCanvas”
Draw! jQuery drawing plugin. 官网
http://plugins.jquery.com/project/Draw
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。