0
所以我想画一个圆形,用黑色和红色的轮廓填充蓝色。红色部分由look
角度决定。 ctx
变量保存2d上下文。 相关代码:用不同的彩色部分画一个圆
ctx..lineWidth = 0.5
..fillStyle = "#0000AA"
..strokeStyle = "red";
ctx.beginPath();
ctx.arc(pos.x, pos.y, radius, look - PI/6, look + PI/6);
ctx..fill()
..closePath()
..stroke()
..beginPath();
ctx.strokeStyle = "black";
ctx.arc(pos.x, pos.y, radius, look + PI/6, look - PI/6);
ctx..fill()
..closePath()
..stroke();
但这绘制圆内的附加红线,我不想要的。我怎样才能摆脱这条线?
谢谢!这工作,不得不删除其他(黑色)线,然后调整角度,因为有一个白色的差距。 – timedt