OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script> | 4 <script> |
5 function main() | 5 function main() |
6 { | 6 { |
7 var ctx = document.getElementById("c").getContext("2d", {colorSpace:'linear-rg
b'}); | 7 var ctx = document.getElementById("c").getContext('2d', {colorSpace: 'srgb', p
ixelFormat: 'float16'}) |
8 ctx.fillStyle = 'red'; | 8 ctx.fillStyle = 'red'; |
9 ctx.fillRect(20,20,50,50); | 9 ctx.fillRect(20,20,50,50); |
10 ctx.fillStyle = 'green'; | 10 ctx.fillStyle = 'green'; |
11 ctx.fillRect(70,20,50,50); | 11 ctx.fillRect(70,20,50,50); |
12 ctx.fillStyle = 'blue'; | 12 ctx.fillStyle = 'blue'; |
13 ctx.fillRect(20,70,50,50); | 13 ctx.fillRect(20,70,50,50); |
14 ctx.fillStyle = 'black'; | 14 ctx.fillStyle = 'black'; |
15 ctx.fillRect(70,70,50,50); | 15 ctx.fillRect(70,70,50,50); |
16 } | 16 } |
17 </script> | 17 </script> |
18 </head> | 18 </head> |
19 <body onload="main()"> | 19 <body onload="main()"> |
20 <canvas id="c" width="140" height="140" class="nomargin"></canvas> | 20 <canvas id="c" width="140" height="140" class="nomargin"></canvas> |
21 </body> | 21 </body> |
22 </html> | 22 </html> |
OLD | NEW |