Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / canvas-composite-shadow.html
blob86f5f5929fa11df496dbc0fbffa3d4fd027fb68f
1 <html>
2 <head>
3 <title>A canvas globalCompositeOperation with shadow</title>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsTextWithPixelResults();
8 var compositeTypes = [
9 'source-over', 'source-in', 'source-out', 'source-atop',
10 'destination-over', 'destination-in', 'destination-out', 'destination-atop',
11 'lighter', 'copy', 'xor', 'multiply', 'screen', 'overlay', 'darken',
12 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light',
13 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'
15 function draw(){
16 for (i=0;i<compositeTypes.length;i++){
17 var label = document.createTextNode(compositeTypes[i]);
18 document.getElementById('lab'+i).appendChild(label);
19 var canvas = document.getElementById('tut'+i);
20 canvas.width = 80;
21 canvas.height = 80;
22 var ctx = canvas.getContext('2d');
24 // draw rectangle
25 ctx.fillStyle = "#09f";
26 ctx.fillRect(5,5,45,45);
28 // set composite property
29 ctx.globalCompositeOperation = compositeTypes[i];
31 // draw rectangle with shadow
32 ctx.fillStyle = "#f30";
33 ctx.shadowColor = 'blue';
34 ctx.shadowBlur = 10;
35 ctx.shadowOffsetX = 10;
36 ctx.shadowOffsetY = -10;
37 ctx.fillRect(20,25,45,45);
40 </script>
41 <style type="text/css">
42 body { margin: 20px; font-family: arial,verdana,helvetica; background: #fff;}
43 h1 { font-size: 140%; font-weight:normal; color: #036; border-bottom: 1px solid #ccc; }
44 canvas { border: 2px solid #000; margin-bottom: 5px; }
45 td { padding: 4px; }
46 pre { float:left; display:block; background: rgb(238,238,238); border: 1px dashed #666; padding: 15px 20px; margin: 0 0 10px 0; }
47 </style>
48 </head>
49 <body onload="draw();">
50 <div>
51 <table>
52 <tr>
53 <td><canvas id="tut0"></canvas><br/><label id="lab0"></label></td>
54 <td><canvas id="tut1"></canvas><br/><label id="lab1"></label></td>
55 <td><canvas id="tut2"></canvas><br/><label id="lab2"></label></td>
56 <td><canvas id="tut3"></canvas><br/><label id="lab3"></label></td>
57 <td><canvas id="tut4"></canvas><br/><label id="lab4"></label></td>
58 <td><canvas id="tut5"></canvas><br/><label id="lab5"></label></td>
59 <td><canvas id="tut6"></canvas><br/><label id="lab6"></label></td>
60 </tr>
61 <tr>
62 <td><canvas id="tut7"></canvas><br/><label id="lab7"></label></td>
63 <td><canvas id="tut8"></canvas><br/><label id="lab8"></label></td>
64 <td><canvas id="tut9"></canvas><br/><label id="lab9"></label></td>
65 <td><canvas id="tut10"></canvas><br/><label id="lab10"></label></td>
66 <td><canvas id="tut11"></canvas><br/><label id="lab11"></label></td>
67 <td><canvas id="tut12"></canvas><br/><label id="lab12"></label></td>
68 <td><canvas id="tut13"></canvas><br/><label id="lab13"></label></td>
69 </tr>
70 <tr>
71 <td><canvas id="tut14"></canvas><br/><label id="lab14"></label></td>
72 <td><canvas id="tut15"></canvas><br/><label id="lab15"></label></td>
73 <td><canvas id="tut16"></canvas><br/><label id="lab16"></label></td>
74 <td><canvas id="tut17"></canvas><br/><label id="lab17"></label></td>
75 <td><canvas id="tut18"></canvas><br/><label id="lab18"></label></td>
76 <td><canvas id="tut19"></canvas><br/><label id="lab19"></label></td>
77 <td><canvas id="tut20"></canvas><br/><label id="lab20"></label></td>
78 </tr>
79 <tr>
80 <td><canvas id="tut21"></canvas><br/><label id="lab21"></label></td>
81 <td><canvas id="tut22"></canvas><br/><label id="lab22"></label></td>
82 <td><canvas id="tut23"></canvas><br/><label id="lab23"></label></td>
83 <td><canvas id="tut24"></canvas><br/><label id="lab24"></label></td>
84 <td><canvas id="tut25"></canvas><br/><label id="lab25"></label></td>
85 </tr>
86 </table>
87 </div>
88 </body>
89 </html>