Quantcast
Channel: HTML5 canvas context doesn't clear with clearRect() - Stack Overflow
Browsing latest articles
Browse All 2 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 latest articles
Browse All 2 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>