2 * @fileoverview Sample onDraw script for use with SkV8Example.
4 var onDraw = function(){
7 p.bezierCurveTo(0, 100, 100, 0, 200, 200);
10 p.arc(0, 300, 40, Math.PI/2, 3/2*Math.PI);
12 context.translate(10, 10);
13 for (var i=0; i<256; i++) {
14 context.strokeStyle = '#0000' + toHex(i);
16 context.translate(1, 0);
18 context.fillStyle = '#ff0000';
19 print(context.width, context.height);
20 context.resetTransform();
21 context.fillRect(context.width/2, context.height/2, 20, 20);
28 var s = n.toString(16);