html5jp_graphs 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +4 -13
- data/lib/html5jp_graphs.rb +6 -0
- data/lib/html5jp_graphs/version.rb +1 -1
- data/vendor/assets/javascripts/html5jp_graphs.js +1 -0
- data/{lib/generators/html5jp_graphs/templates/graph → vendor/assets/javascripts/html5jp_graphs}/circle.js +0 -0
- data/{lib/generators/html5jp_graphs/templates/excanvas → vendor/assets/javascripts/html5jp_graphs}/excanvas-compressed.js +0 -0
- data/{lib/generators/html5jp_graphs/templates/excanvas → vendor/assets/javascripts/html5jp_graphs}/excanvas.js +0 -0
- data/{lib/generators/html5jp_graphs/templates/graph → vendor/assets/javascripts/html5jp_graphs}/line.js +0 -0
- data/{lib/generators/html5jp_graphs/templates/graph → vendor/assets/javascripts/html5jp_graphs}/radar.js +0 -0
- data/{lib/generators/html5jp_graphs/templates/graph → vendor/assets/javascripts/html5jp_graphs}/vbar.js +0 -0
- metadata +53 -44
- checksums.yaml +0 -15
- data/lib/generators/html5jp_graphs/USAGE +0 -8
- data/lib/generators/html5jp_graphs/html5jp_graphs_generator.rb +0 -12
- data/lib/generators/html5jp_graphs/templates/excanvas/AUTHORS +0 -10
- data/lib/generators/html5jp_graphs/templates/excanvas/COPYING +0 -202
- data/lib/generators/html5jp_graphs/templates/excanvas/README +0 -22
- data/lib/generators/html5jp_graphs/templates/excanvas/examples/example1.html +0 -93
- data/lib/generators/html5jp_graphs/templates/excanvas/examples/example2.html +0 -513
- data/lib/generators/html5jp_graphs/templates/excanvas/examples/example3.html +0 -284
- data/lib/generators/html5jp_graphs/templates/excanvas/examples/ff.jpg +0 -0
- data/lib/generators/html5jp_graphs/templates/excanvas/testcases/arc.html +0 -49
- data/lib/generators/html5jp_graphs/templates/excanvas/testcases/linewidth.html +0 -47
- data/lib/generators/html5jp_graphs/templates/excanvas/testcases/overflow.html +0 -37
- data/lib/generators/html5jp_graphs/templates/excanvas/testcases/quadraticcurve.html +0 -74
- data/lib/generators/html5jp_graphs/templates/excanvas/testcases/resizing.html +0 -65
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<title>ExplorerCanvas Text Case</title>
|
|
4
|
-
<!--[if IE]><script type="text/javascript" src="../excanvas.js"></script><![endif]-->
|
|
5
|
-
<script>
|
|
6
|
-
// Safari is known not to handle resizing well, expect this to
|
|
7
|
-
// compare to Firefox
|
|
8
|
-
|
|
9
|
-
var cv, ctx, size = 80;
|
|
10
|
-
var img = new Image();
|
|
11
|
-
img.src = "../examples/ff.jpg";
|
|
12
|
-
|
|
13
|
-
function a() {
|
|
14
|
-
cv = document.getElementById("aa");
|
|
15
|
-
ctx = cv.getContext("2d");
|
|
16
|
-
|
|
17
|
-
l();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function l() {
|
|
21
|
-
size = (size + 1) % 800;
|
|
22
|
-
cv.width = Number(size + 200);
|
|
23
|
-
cv.height = Number((size + 200) / 2);
|
|
24
|
-
|
|
25
|
-
// Firefox autoclears the canvas at this point
|
|
26
|
-
|
|
27
|
-
ctx.save();
|
|
28
|
-
ctx.translate(50, 50);
|
|
29
|
-
ctx.scale(0.1, 0.1);
|
|
30
|
-
ctx.rotate(size/800 * Math.PI*8);
|
|
31
|
-
ctx.drawImage(img, 0, -75);
|
|
32
|
-
ctx.restore();
|
|
33
|
-
|
|
34
|
-
ctx.save();
|
|
35
|
-
ctx.beginPath();
|
|
36
|
-
ctx.moveTo(0, 0);
|
|
37
|
-
ctx.lineTo(cv.width, cv.height);
|
|
38
|
-
ctx.moveTo(20, 20);
|
|
39
|
-
ctx.lineTo(80, 20);
|
|
40
|
-
ctx.lineTo(80, 80);
|
|
41
|
-
ctx.lineTo(20, 80);
|
|
42
|
-
ctx.stroke();
|
|
43
|
-
ctx.closePath();
|
|
44
|
-
ctx.restore();
|
|
45
|
-
|
|
46
|
-
ctx.save();
|
|
47
|
-
ctx.beginPath();
|
|
48
|
-
ctx.scale(size / 200, size / 200);
|
|
49
|
-
ctx.arc(100, 50, 20, 0, Math.PI, true);
|
|
50
|
-
ctx.fill();
|
|
51
|
-
ctx.restore();
|
|
52
|
-
|
|
53
|
-
setTimeout(l, 50);
|
|
54
|
-
}
|
|
55
|
-
</script>
|
|
56
|
-
<style>
|
|
57
|
-
canvas {
|
|
58
|
-
background-color:#eee;
|
|
59
|
-
}
|
|
60
|
-
</style>
|
|
61
|
-
</head>
|
|
62
|
-
<body onload="a();">
|
|
63
|
-
<canvas id="aa" width="200" height="200"></canvas>
|
|
64
|
-
</body>
|
|
65
|
-
</html>
|