Mercurial > laserkard
comparison 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 |
comparison
equal
deleted
inserted
replaced
28:5b5c03a850b9 | 29:7742910e0479 |
---|---|
1 | |
2 | |
3 var robert = (function process() | |
4 { | |
5 // Creates canvas 320 × 200 at 10, 50 | |
6 var paper = Raphael(10, 50, 320, 200); | |
7 | |
8 // Creates circle at x = 50, y = 40, with radius 10 | |
9 var circle = paper.circle(50, 40, 10); | |
10 // Sets the fill attribute of the circle to red (#f00) | |
11 circle.attr("fill", "#f00"); | |
12 | |
13 // Sets the stroke attribute of the circle to white | |
14 circle.attr("stroke", "#fff"); | |
15 | |
16 } | |
17 ) | |
18 |