|
1 <!DOCTYPE HTML> |
|
2 <!-- |
|
3 Any copyright is dedicated to the Public Domain. |
|
4 http://creativecommons.org/licenses/publicdomain/ |
|
5 --> |
|
6 <html> |
|
7 <head> |
|
8 <title>reference image-rendering</title> |
|
9 <style> |
|
10 canvas { position:absolute;left:0px;top:0px; } |
|
11 </style> |
|
12 <script type="text/javascript"> |
|
13 function draw() { |
|
14 var canvas = document.getElementById("canvas"); |
|
15 var ctx = canvas.getContext("2d"); |
|
16 ctx.fillStyle = "rgb(255,0,0)"; |
|
17 ctx.fillRect(50,50,200,200); |
|
18 ctx.fillStyle = "rgb(0,255,0)"; |
|
19 ctx.fillRect(50,50,100,100); |
|
20 } |
|
21 </script> |
|
22 </head> |
|
23 <body onload="draw();"> |
|
24 <canvas id="canvas" width="300" height="300"></canvas> |
|
25 </body> |
|
26 </html> |