Answers for "clear the canvas in javascript"

16

Javascript clear canvas

var canvas = document.getElementById("myCanvasID");
var context = canvas.getContext('2d');
context.clearRect(0, 0, canvas.width, canvas.height); //clear html5 canvas
Posted by: Guest on July-25-2019
5

clear ctx canvas with javascript

ctx.clearRect(0, 0, canvas.width, canvas.height);
Posted by: Guest on June-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language