我想要在canvas
中画出这种图案螺旋,我使用下面的代码 需要您的帮助,为进一步绘制圆。在画布上绘制螺旋圈
// get the canvas element using the DOM
var canvas = document.getElementById('circlecanvas');
// Make sure we don't execute when canvas isn't supported
if (canvas.getContext){
// use getContext to use the canvas for drawing
var ctx = canvas.getContext('2d');
// Draw shapes
ctx.beginPath();
//context.arc(x, y, radius, startAngle, endAngle, counterClockwise);
for (i=0;i<9;i++){
ctx.arc(50, 50, 50, i, Math.PI * 2, false);
ctx.fill();
}
}
您遇到的问题是什么?什么都没发生?有错误?等等? – Veger 2013-03-19 12:06:44
只有一个圆圈正在绘制..但想要看起来像在模式 – 2013-03-19 12:11:43