以下内容应该有效:context.moveTo(cx,cy); context.arc(cx,cy,radius,startangle,endangle); context.lineTo(cx,cy); context.stroke(); // or context.fill() 以 cx 和 cy 作为弧的中心。
context.beginPath()
/context.closePath()
是怎么样的?一些像clearRect()
这样的东西如果没有它们就无法正常工作。 - tigrou