summaryrefslogtreecommitdiffstats
path: root/layout/reftests/canvas/nonzero-fill-2.html
blob: 890716b81f1f2e5d03dcbb1ba8bc253e50a96b5d (plain)
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
<html>
<head>
  <script type="text/javascript">
window.onload = function() {
    var ctx = document.getElementById("c1").getContext("2d");

    ctx.moveTo(50, 50);
    ctx.lineTo(250, 50);
    ctx.lineTo(250, 250);
    ctx.lineTo(50, 250);
    ctx.lineTo(50, 50);

    ctx.moveTo(100, 100);
    ctx.lineTo(100, 200);
    ctx.lineTo(200, 200);
    ctx.lineTo(200, 100);
    ctx.lineTo(100, 100);

    ctx.fill();
}
  </script>
</head>
<body>
  <div><canvas id="c1" width="300" height="300"></canvas></div>
</body>
</html>