Canvas 'shape artifact' appearing when drawing an image after clear

前端 未结 1 349
灰色年华
灰色年华 2021-01-25 07:00

I\'m having a really puzzling canvas artifact / bug in my web application. After clearing the canvas, a circle shape that has been previously cleared reappears when drawing anot

相关标签:
1条回答
  • 2021-01-25 07:33

    Remember to use beginPath() to clear all previous paths.

    When you clear the canvas simply call this method and the previous paths won't be re-rendered next time you stroke or fill.

    0 讨论(0)
提交回复
热议问题