HTML5 Canvas 似乎在某些条件下绘制了不完美的球。当有红色背景和带有黑色轮廓的蓝色圆圈时,看起来轮廓在左侧更宽,在右侧更细。这是一个说明这一点的小提琴:https ://jsfiddle.net/omgszg38/4/ 。你不觉得吗?
这是绘制球的代码:
d.beginPath();
d.fillStyle = "blue";
d.arc(x,y,radius,0,Math.PI*2,false);
d.fill();
d.lineWidth = 1; //Ball stroke
d.beginPath();
d.arc(x,y,radius,0,Math.PI*2,false);
d.stroke();
注意:我已经在另一个论坛寻求帮助,如果您需要更多信息,这里就是:http ://www.webdeveloper.com/forum/showthread.php?359393-Imperfect-Ball-drawing-on- HTML5-画布