Mercurial > laserkard
comparison js.html @ 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 | 4ebd94bfecda |
comparison
equal
deleted
inserted
replaced
28:5b5c03a850b9 | 29:7742910e0479 |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
2 <html xmlns="http://www.w3.org/1999/xhtml"> | |
3 <head> | |
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
5 | |
6 <link href="./main.css" rel="stylesheet" type="text/css"> | |
7 <link href="./sexy.css" rel="stylesheet" type="text/css"> | |
8 | |
9 | |
10 <title>test Shiv!!!</title> | |
11 | |
12 <script type="text/javascript" src="./buycode.js"></script> | |
13 <script type="text/javascript" src="./awesome_js/raphael.js"></script> | |
14 <script type="text/javascript" src="./awesome_js/robert.js"></script> | |
15 <script type="text/javascript" src="./awesome_js/cufon-yui.js"></script> | |
16 <!--<script type="text/javascript" src="./awesome_js/HelveticaNeue_LT_75_BdOutline_400.font.js"></script>--> | |
17 | |
18 <script type="text/javascript" src="./awesome_js/HelveticaNeue_LT_55_Roman_700-HelveticaNeue_LT_55_Roman_700-HelveticaNeue_LT_55_Roman_italic_700-HelveticaNeue_LT_55_Roman_italic_700.font.js"></script> | |
19 <script type="text/javascript"> | |
20 Cufon.replace('h1'); | |
21 </script> | |
22 | |
23 | |
24 | |
25 </head> | |
26 | |
27 | |
28 | |
29 | |
30 | |
31 <body> | |
32 | |
33 | |
34 <div id ="overlay"> | |
35 | |
36 | |
37 </div> | |
38 | |
39 </div> | |
40 | |
41 | |
42 | |
43 | |
44 | |
45 <script language="javascript"> | |
46 // Creates canvas 320 × 200 at 10, 50 | |
47 | |
48 var paper = Raphael("overlay", 518, 320); | |
49 | |
50 | |
51 // Creates circle at x = 50, y = 40, with radius 10 | |
52 //var circle = paper.circle(50, 40, 10); | |
53 // Sets the fill attribute of the circle to red (#f00) | |
54 //circle.attr("fill", "#f00"); | |
55 | |
56 // Sets the stroke attribute of the circle to white | |
57 //circle.attr("stroke", "#fff"); | |
58 | |
59 // regular rectangle | |
60 //var c = paper.rect(10, 10, 50, 50); | |
61 // rectangle with rounded corners | |
62 //var c = paper.rect(40, 40, 50, 50, 10); | |
63 | |
64 //var c = paper.ellipse(50, 50, 40, 20); | |
65 | |
66 //var t = paper.text(50, 50, "Raphaël\nkicks\nbutt!"); | |
67 //var c = paper.path("M10 10L90 90"); | |
68 | |
69 //var c = paper.circle(20, 20, 10); | |
70 //c.node.onclick = function () { | |
71 // c.attr("fill", "red"); | |
72 //}; | |
73 | |
74 //var c = paper.circle(20, 20, 10); | |
75 //c.animate({cx: 20, r: 20}, 2000); | |
76 //c.animate({cx: 20, r: 20}, 2000, "bounce"); | |
77 | |
78 | |
79 //var c = paper.circle(10, 10, 10), | |
80 // r = paper.rect(10, 10, 10, 10); | |
81 //c.animate({cx: 20, r: 20}, 2000); | |
82 //r.animateWith(c, {x: 20}, 2000); | |
83 //var tt = paper.print(10, 150, "Kevin Rustagi", paper.getFont("HelveticaNeue", 800), 75); | |
84 | |
85 tt = paper.print(10, 150, "Kevin Rustagi", paper.getFont("HelveticaNeue", 800), 75); | |
86 tt.attr("stroke", "#f00"); | |
87 tt.attr("fill", "transparent"); | |
88 tt.remove(); | |
89 | |
90 tt = paper.print(10, 150, "Robert McIntyre", paper.getFont("HelveticaNeue", 800), 75); | |
91 tt.attr("stroke", "#f00"); | |
92 tt.attr("fill", "transparent"); | |
93 //tt.show(); | |
94 | |
95 </script> | |
96 | |
97 | |
98 | |
99 | |
100 | |
101 | |
102 | |
103 | |
104 </body> | |
105 | |
106 | |
107 </html> |