Skip to content

Instantly share code, notes, and snippets.

@stpettersens
Created July 3, 2012 22:02
Show Gist options
  • Save stpettersens/3043678 to your computer and use it in GitHub Desktop.
Save stpettersens/3043678 to your computer and use it in GitHub Desktop.
Clear the canvas.
// Clear the canvas.
context.clearRect(0, canvas.width, canvas.height);
/* Where context is a CanvasCanvasRenderingContext2D object
assigned via canvas.getContext("2d"); and canvas is
a canvas element. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment