Created
January 1, 2015 00:30
-
-
Save anonymous/328db63df71026391246 to your computer and use it in GitHub Desktop.
Fill rect method
This file contains 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
var canvas = document.getElementById('mycanvas'); | |
var context = canvas.getContext('2d'); | |
context.strokeStyle = '#0000ff'; | |
context.lineWidth = 2; | |
context.beginPath(); | |
context.fillStyle = '#00ff00'; | |
context.fill(); | |
context.fillRect(100, 10, 150, 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment