出于某种原因,在canvas 2d上下文中对弧函数使用小角度时 它没有显示,即使角度约为1度,这甚至不是那么小
如何修复或克服此问题? (我使用的是铬,以防万一)
实施例:
var c = document.getElementById("canvas").getContext("2d");
//THIS IS SHOWN
c.beginPath();
c.moveTo(200, 200);
c.arc(200, 200, 200, 0, 0.023);
c.lineTo(200, 200);
c.fill();
//THIS IS NOT SHOWN???
c.beginPath();
c.moveTo(200, 200);
c.arc(200, 200, 200, Math.PI, Math.PI + 0.022); //change 22 to 23 to "fix"
c.lineTo(200, 200);
c.fill();

#canvas {
background-color: lightblue;
}

<canvas id="canvas" width="400" height="400"></canvas>
&#13;