Quantcast
Browsing all 2 articles
Browse latest View live

Answer by dsgriffin for HTML5 canvas context doesn't clear with clearRect()

You've forgotten to begin a new path each time using .beginPath() (prevents the event stacking issue you're witnessing):bufCanvas.addEventListener('mousedown', function (e) { ctx.clearRect(0, 0, 500,...

View Article


HTML5 canvas context doesn't clear with clearRect()

I have two canvases: a buffer and a display canvas whose context gets a drawImage() call with the buffer canvas. I clearRect() both canvases before adding new objects and calling drawImage(), but both...

View Article

Browsing all 2 articles
Browse latest View live