aboutsummaryrefslogtreecommitdiffstats
path: root/tests/html/test_canvas.html
blob: 8a9918af54cb44b40ad33292227fbb1d41488d10 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html>
<html>
<body>
<canvas id="tutorial" style="border:1px solid #d3d3d3"></canvas>
<script type="text/javascript">

canvas = document.getElementById('tutorial');
canvas.width = 200;
canvas.height = 200;

var ctx = canvas.getContext('2d');
ctx.fillRect(10.0,10.0,100.0,100.0);
ctx.strokeRect(20.0,40.0,80.0,80.0);
ctx.clearRect(10.0,10.0,100.0,100.0);

</script>
</body>
</html>