Answers for "clear canvas content jquery"


clear canvas content jquery

//set a const for all the code 
const context = canvas.getContext('2d');

//to clear the canvas use:
context.clearRect(0, 0, canvas.width, canvas.height);

//if the canvas is with 300 and height 450:
context.clearRect(0, 0, 300, 450);
Posted by: Guest on November-15-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language