I got some lines drawn on my canvas. I want to clear it so that I can draw some new lines.
I use context.clearRect(0, 0, canvas.width, canvas.height);, just as everyone is suggesting. But when I draw some new lines, all the lines I've previously drawn reappear.
When using the canvas.width = canvas.width trick, it works as expected.
What am I missing?