comparison awesome_js/robert.js @ 40:1ac1409ea68c laserkard

[svn r41] implemented dynamic text.
author rlm
date Mon, 25 Jan 2010 03:42:08 -0500
parents 7742910e0479
children ef8615de8a9c
comparison
equal deleted inserted replaced
39:8b3b5753ad41 40:1ac1409ea68c
1 1
2 2
3 var robert = (function process() 3 window.Robert = (function () {
4 {
5 // Creates canvas 320 × 200 at 10, 50
6 var paper = Raphael(10, 50, 320, 200);
7 4
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 5
13 // Sets the stroke attribute of the circle to white 6 var separator = /[, ]+/,
14 circle.attr("stroke", "#fff"); 7 elements = /^(circle|rect|path|ellipse|text|image)$/,
15 8
16 } 9 Paper = function () {},
17 )
18