Created
July 16, 2012 12:46
-
-
Save RudolfVonKrugstein/3122496 to your computer and use it in GitHub Desktop.
haste drawing javascript
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
function jsGetContext2d(canvas, _) { | |
return [1,0,canvas.getContext("2d")]; | |
} | |
function jsFillRect(context, x, y, width, height, _) { | |
context.fillRect(x,y,width,height); | |
return [1,0]; | |
} | |
function jsSetFillColor(context, color, _) { | |
context.setFillColor(color); | |
return [1,0]; | |
} | |
function jsClear(context, _) { | |
context.clearRect(0.0, 0.0, context.canvas.width, context.canvas.height); | |
return [1,0] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment