-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
39 lines (28 loc) · 931 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<html>
<head>
<title>dsDraw</title>
<style type="text/css">
canvas { border: 1px solid black; }
</style>
<script type="text/javascript" src="dsDraw.js"></script>
<script type="text/javascript">
function draw(){
var canvas = document.getElementById('tutorial')
if (canvas.getContext){
var ctx = canvas.getContext('2d');
ctx.save()
var array = ["a", "b", "c", "d", "e", "f", "\\0"]
drawer = arrayDrawer()
drawer.draw(array, ctx)
ctx.translate(0, 75)
drawer = arrayDrawer({cellWidth: drawer.arrayCellWidth(array)})
drawer.draw(['a', 'b', '', '', '', '', ''], ctx)
ctx.restore()
}
}
</script>
</head>
<body onload="draw();">
<canvas id="tutorial" width="800" height="600"></canvas>
</body>
</html>