I am concerned about the existing space between one filling and another filling in HTML. Each fill fits on their side. I expect you to fill in exactly the line, but there is a space.
this is an example code:
var canvas = document.createElement("canvas"); canvas.width = 120; canvas.height = 300; document.body.appendChild(canvas); var ctx = canvas.getContext("2d"); ctx.fillStyle = "#fff"; ctx.fillRect(0, 0, 120, 300); ctx.fillStyle = "#000"; ctx.beginPath(); ctx.moveTo(0, 0); ctx.lineTo(0, 300); ctx.lineTo(120, 300); ctx.fill(); ctx.fillStyle = "#000"; ctx.beginPath(); ctx.moveTo(120, 300); ctx.lineTo(0, 0); ctx.lineTo(120, 0); ctx.fill();
You can see the white line (space) between the black triangles. In fact, triangle points are created by the auto-generated program for Flash, and Flash can display triangles without space, but HTML5 cannot. Does anyone have an idea what to erase this line?
source share