Skip to content

Instantly share code, notes, and snippets.

@gmisail
Last active December 11, 2016 16:56
Show Gist options
  • Save gmisail/e8b2b0954243d1c922c5096119aa8b62 to your computer and use it in GitHub Desktop.
Save gmisail/e8b2b0954243d1c922c5096119aa8b62 to your computer and use it in GitHub Desktop.
/* Example A*/
/* HTML */
<canvas id='view' width=800 height=600></canvas>
/* JS */
var canvas = document.getElementById('view').getContext('2d');
/* Example B*/
/* HTML */
<canvas id='view' width=800 height=600></canvas>
/* JS */
var canvas = document.getElementById('view').getContext('2d');
canvas.fillStyle = "black";
canvas.fillRect(0, 0, 800, 600);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment