Mercurial > laserkard
diff 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 |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js.html Sat Jan 16 12:25:43 2010 -0500 1.3 @@ -0,0 +1,107 @@ 1.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 1.5 +<html xmlns="http://www.w3.org/1999/xhtml"> 1.6 +<head> 1.7 +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 1.8 + 1.9 +<link href="./main.css" rel="stylesheet" type="text/css"> 1.10 +<link href="./sexy.css" rel="stylesheet" type="text/css"> 1.11 + 1.12 + 1.13 +<title>test Shiv!!!</title> 1.14 + 1.15 +<script type="text/javascript" src="./buycode.js"></script> 1.16 +<script type="text/javascript" src="./awesome_js/raphael.js"></script> 1.17 +<script type="text/javascript" src="./awesome_js/robert.js"></script> 1.18 +<script type="text/javascript" src="./awesome_js/cufon-yui.js"></script> 1.19 +<!--<script type="text/javascript" src="./awesome_js/HelveticaNeue_LT_75_BdOutline_400.font.js"></script>--> 1.20 + 1.21 +<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> 1.22 +<script type="text/javascript"> 1.23 +Cufon.replace('h1'); 1.24 +</script> 1.25 + 1.26 + 1.27 + 1.28 +</head> 1.29 + 1.30 + 1.31 + 1.32 + 1.33 + 1.34 +<body> 1.35 + 1.36 + 1.37 + <div id ="overlay"> 1.38 + 1.39 + 1.40 + </div> 1.41 + 1.42 +</div> 1.43 + 1.44 + 1.45 + 1.46 + 1.47 + 1.48 +<script language="javascript"> 1.49 +// Creates canvas 320 × 200 at 10, 50 1.50 + 1.51 +var paper = Raphael("overlay", 518, 320); 1.52 + 1.53 + 1.54 +// Creates circle at x = 50, y = 40, with radius 10 1.55 +//var circle = paper.circle(50, 40, 10); 1.56 +// Sets the fill attribute of the circle to red (#f00) 1.57 +//circle.attr("fill", "#f00"); 1.58 + 1.59 +// Sets the stroke attribute of the circle to white 1.60 +//circle.attr("stroke", "#fff"); 1.61 + 1.62 +// regular rectangle 1.63 +//var c = paper.rect(10, 10, 50, 50); 1.64 +// rectangle with rounded corners 1.65 +//var c = paper.rect(40, 40, 50, 50, 10); 1.66 + 1.67 +//var c = paper.ellipse(50, 50, 40, 20); 1.68 + 1.69 +//var t = paper.text(50, 50, "Raphaël\nkicks\nbutt!"); 1.70 +//var c = paper.path("M10 10L90 90"); 1.71 + 1.72 +//var c = paper.circle(20, 20, 10); 1.73 +//c.node.onclick = function () { 1.74 +// c.attr("fill", "red"); 1.75 +//}; 1.76 + 1.77 +//var c = paper.circle(20, 20, 10); 1.78 +//c.animate({cx: 20, r: 20}, 2000); 1.79 +//c.animate({cx: 20, r: 20}, 2000, "bounce"); 1.80 + 1.81 + 1.82 +//var c = paper.circle(10, 10, 10), 1.83 +// r = paper.rect(10, 10, 10, 10); 1.84 +//c.animate({cx: 20, r: 20}, 2000); 1.85 +//r.animateWith(c, {x: 20}, 2000); 1.86 +//var tt = paper.print(10, 150, "Kevin Rustagi", paper.getFont("HelveticaNeue", 800), 75); 1.87 + 1.88 +tt = paper.print(10, 150, "Kevin Rustagi", paper.getFont("HelveticaNeue", 800), 75); 1.89 +tt.attr("stroke", "#f00"); 1.90 +tt.attr("fill", "transparent"); 1.91 +tt.remove(); 1.92 + 1.93 +tt = paper.print(10, 150, "Robert McIntyre", paper.getFont("HelveticaNeue", 800), 75); 1.94 +tt.attr("stroke", "#f00"); 1.95 +tt.attr("fill", "transparent"); 1.96 +//tt.show(); 1.97 + 1.98 +</script> 1.99 + 1.100 + 1.101 + 1.102 + 1.103 + 1.104 + 1.105 + 1.106 + 1.107 +</body> 1.108 + 1.109 + 1.110 +</html>