OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <title>A canvas globalCompositeOperation example</title> | 3 <title>A canvas globalCompositeOperation example</title> |
4 <meta name="DC.creator" content="Kamiel Martinet, http://www.martinet.nl/"> | 4 <meta name="DC.creator" content="Kamiel Martinet, http://www.martinet.nl/"> |
5 <meta name="DC.publisher" content="Mozilla Developer Center, http://develope
r.mozilla.org"> | 5 <meta name="DC.publisher" content="Mozilla Developer Center, http://develope
r.mozilla.org"> |
6 <script type="application/x-javascript"> | 6 <script type="application/x-javascript"> |
7 if (window.testRunner) | 7 if (window.testRunner) |
8 testRunner.dumpAsTextWithPixelResults(); | 8 testRunner.dumpAsTextWithPixelResults(); |
9 | 9 |
10 // This test should show a table of canvas elements. The canvas elements h
ave transforms | 10 // This test should show a table of canvas elements. The canvas elements h
ave transforms |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 // In each row the green rectangle or ellipse should be drawn with the app
ropriate compositing | 23 // In each row the green rectangle or ellipse should be drawn with the app
ropriate compositing |
24 // mode, as per the HTML5 canvas spec. | 24 // mode, as per the HTML5 canvas spec. |
25 | 25 |
26 // In each cell the drawing should be contained within the cell boundary. | 26 // In each cell the drawing should be contained within the cell boundary. |
27 | 27 |
28 // These map to the rows of the table | 28 // These map to the rows of the table |
29 var compositeTypes = [ | 29 var compositeTypes = [ |
30 'source-over','source-in','source-out','source-atop', | 30 'source-over','source-in','source-out','source-atop', |
31 'destination-over','destination-in','destination-out','destination-atop'
, | 31 'destination-over','destination-in','destination-out','destination-atop'
, |
32 'lighter','darker','copy','xor' | 32 'lighter','copy','xor' |
33 ]; | 33 ]; |
34 // These map to the columns of the table | 34 // These map to the columns of the table |
35 var testNames = [ | 35 var testNames = [ |
36 'solid rect on solid', 'alpha rect on solid', 'solid rect on alpha', | 36 'solid rect on solid', 'alpha rect on solid', 'solid rect on alpha', |
37 'alpha rect on alpha', 'solid path on solid', 'alpha path on solid', | 37 'alpha rect on alpha', 'solid path on solid', 'alpha path on solid', |
38 'solid path on alpha', 'alpha path on alpha', | 38 'solid path on alpha', 'alpha path on alpha', |
39 ]; | 39 ]; |
40 function createOutputTable() { | 40 function createOutputTable() { |
41 var tableEl = document.getElementById('outputtable'); | 41 var tableEl = document.getElementById('outputtable'); |
42 var row = tableEl.insertRow(-1); | 42 var row = tableEl.insertRow(-1); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 table { border-collapse: collapse; } | 111 table { border-collapse: collapse; } |
112 </style> | 112 </style> |
113 </head> | 113 </head> |
114 <body onload="draw();"> | 114 <body onload="draw();"> |
115 <div> | 115 <div> |
116 <table id='outputtable'> | 116 <table id='outputtable'> |
117 </table> | 117 </table> |
118 </div> | 118 </div> |
119 </body> | 119 </body> |
120 </html> | 120 </html> |
OLD | NEW |