Canvas, drawing of two concentric circles: Abnormal behavior? in JavaScript Posted April 15, 2019 The following simple code draws, in addition to the two circles, also a mysterious horizontal line between the two circles. How can I solve it? <script> var canvas = document.getElementById("myCanvas"); var ctx = canvas.getContext("2d"); ctx.beginPath(); ctx.arc (250, 250, 200, 0, 2*Math.PI); ctx.arc (250, 250, 180, 0, 2*Math.PI); ctx.stroke(); </script>
Canvas, drawing of two concentric circles: Abnormal behavior?
in JavaScript
Posted
The following simple code draws, in addition to the two circles, also a mysterious horizontal line between the two circles. How can I solve it?
<script>
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
ctx.beginPath();
ctx.arc (250, 250, 200, 0, 2*Math.PI);
ctx.arc (250, 250, 180, 0, 2*Math.PI);
ctx.stroke();
</script>