Skip to content

Instantly share code, notes, and snippets.

@geovanerocha
Created September 26, 2012 00:45
Show Gist options
  • Save geovanerocha/3785343 to your computer and use it in GitHub Desktop.
Save geovanerocha/3785343 to your computer and use it in GitHub Desktop.
Simple HTML5 Canvas Sample
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.fillStyle = "#FF0000";
ctx.fillRect(0,0,150,75);
<canvas id="myCanvas" width="200" height="100"
style="border:1px solid #000000;">
</canvas>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment