HTML5 canvas- use a function to clear an image that has been drawn to the canvas
Hi,
I have a JavaScript function that draws an image (which is being used as a button), to my canvas... When the image is clicked, another function is called, which draws the next set of elements to the canvas.
The problem I have, is that the image drawn by the first function is still on the canvas when the elements drawn by the second function appear. I want to include a call to canvas.remove(image drawn by first function), at the start of my second function, but I'm not sure how I would do this- what the command I would need to call is, or the syntax of it.
Bookmarks