问题,请看图。图1,fill绘制扇形,用closePath()收口,如何去除边线颜色。
//用fill绘制扇形 c.beginPath(); c.fillStyle = "coral"; c.moveTo(200, 300); c.arc(200, 300, 200, Math.PI * 7 / 6, Math.PI * 11 / 6); c.closePath(); c.fill(); c.beginPath(); c.fillStyle = "blanchedalmond"; c.moveTo(200, 300); c.arc(200, 300, 100, Math.PI * 7 / 6, Math.PI * 11 / 6); c.closePath(); c.fill() //用stroke绘制扇形 c.beginPath(); c.strokeStyle = "coral"; c.lineWidth = 100; c.arc(600, 300, 150, Math.PI * 11 / 6, Math.PI * 7 / 6, true); c.stroke();
Dorange
相关分类