+ 4

How to clear fillText from HTML5 Canvas

When I try to use c.clearRect the doesnt doesnt get cleared, Im writing the text onto the canvas using c.fillText? Does anyone know how to make it so the text will be cleared? Thanks.

18th May 2018, 11:06 PM
Ole113
Ole113 - avatar
5 Answers
+ 2
Ole113 敊鱝 , it would be better if you can provide a code link. Maybe you're just missing something.
19th May 2018, 2:44 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
+ 1
The key to this is, as HAPPY TO HELP showed, using multiple canvases. This will make it easier. Using only one canvas, will make it an arduous task. Hope this helped. Upvote plz!
19th May 2018, 2:02 PM
Siddharth
Siddharth - avatar
0
So it would be better to just use js to make another canvas and then remove the canvas when the time comes?
19th May 2018, 12:51 AM
Ole113
Ole113 - avatar
0
ctx.clearRect(0,0,width,height)
20th May 2018, 4:53 AM
Anurag Hazru
Anurag Hazru - avatar
0
How to build form in canvas ? anybody know..
2nd Dec 2020, 11:37 AM
pavinane
pavinane - avatar