HTML canvas fill difference on Firefox vs Chrome
问题 Consider the snippet below - available on jsFiddle: http://jsfiddle.net/Xqu5U/2/ ctx = document.getElementById('canvas').getContext('2d'); ctx.beginPath(); ctx.fillStyle = '#FF0000'; for (var i = 0; i < 20; i++) { ctx.arc(i * 10, 50 + Math.sin(i * 0.5) * 15, 2, 0, Math.PI * 2); } ctx.fill(); It works as expected on Google Chrome, but Firefox renders a fill from the last arc to the first one. How can the snippet above be updated to get Firefox drawing the arcs exactly like Chrome? 回答1: I found