Created
December 20, 2011 12:01
-
-
Save dennisschaaf/1501351 to your computer and use it in GitHub Desktop.
Draw rectangles using canvas.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Draw a stroked rect | |
ctx.beginPath(); | |
ctx.rect(10, 10, 100, 100); | |
ctx.stroke(); | |
// Draw a filled rect | |
ctx.fillRect(200, 10, 100, 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment