[html5] SVG lineTo in a loop
黃俊毓
yillkid at gmail.com
Fri Dec 21 11:25:12 PST 2012
Hi all.
I can coding as blow to draw a polygonal line:
var ctx = canvas.getContext("2d");
ctx.beginPath();
ctx.moveTo(0,126);
{ data in loop }
ctx.lineTo(x , {{data}});
{ endfor }
ctx.stroke();
ctx.closePath();
But if I want to set a moveto one time and multi times lineto with a loop,
how I should do with SVG ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20121222/c54bcaee/attachment-0001.htm>
More information about the Help
mailing list