Is it necessary to include ctx.closePath() if I am going to use ctx.fill() or ctx.stroke() when drawing paths in canvas?
Here is an example below:
ctx.beginPath()
// point 1
ctx.moveTo(x+0.5,y+0.5)
// point2
ctx.lineTo(x2+0.5, y2+0.5)
// point 3
ctx.lineTo(x3+0.5, y3+0.5)
ctx.closePath() // <--- IS THIS NECESSARY ?
ctx.stroke()