diff awesome_js/robert.js @ 29:7742910e0479 laserkard

[svn r30] implemented drawing text on the picture dynamically. still need to center stuff
author rlm
date Sat, 16 Jan 2010 12:25:43 -0500
parents
children 1ac1409ea68c
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/awesome_js/robert.js	Sat Jan 16 12:25:43 2010 -0500
     1.3 @@ -0,0 +1,18 @@
     1.4 +
     1.5 +
     1.6 +var robert = (function process()
     1.7 +{
     1.8 +// Creates canvas 320 × 200 at 10, 50
     1.9 +var paper = Raphael(10, 50, 320, 200);
    1.10 +
    1.11 +// Creates circle at x = 50, y = 40, with radius 10
    1.12 +var circle = paper.circle(50, 40, 10);
    1.13 +// Sets the fill attribute of the circle to red (#f00)
    1.14 +circle.attr("fill", "#f00");
    1.15 +
    1.16 +// Sets the stroke attribute of the circle to white
    1.17 +circle.attr("stroke", "#fff");
    1.18 +
    1.19 +}
    1.20 +)
    1.21 +