File: overflow.html

package info (click to toggle)
explorercanvas 0.r3-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 236 kB
  • ctags: 73
  • sloc: makefile: 6
file content (37 lines) | stat: -rw-r--r-- 687 bytes parent folder | download | duplicates (3)
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
<!DOCTYPE html>
<html>
<head>
<title>Overflow Test</title>
<style>

body {
  text-align: center
}

</style>
<!--[if IE]><script type="text/javascript" src="../excanvas.js"></script><![endif]-->
<script>

window.onload = function() {
  var ctx = document.getElementById('c').getContext('2d');
	
  ctx.fillStyle = 'blue';
  ctx.fillRect(-50, -50, 100, 100);
  
  ctx.fillStyle = 'green';
  ctx.fillRect(50, 50, 100, 100);
  
  ctx.strokeStyle = 'black';
  ctx.strokeRect(0, 0, 100, 100);
};

</script>
</head>
<body>

<canvas id=c width=100 height=100></canvas>

<p>This tests if content gets cropped if painting outside the canvas.</p>

</body>
</html>