Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Side by Side Diff: LayoutTests/fast/canvas/canvas-ellipse-circumference.html

Issue 14298022: Add support for new canvas ellipse method. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make canvas-ellipse-360-winding.html for virtual/gpu pass. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head></head> 3 <head></head>
4 <body> 4 <body>
5 <canvas id="mycanvas" width="600" height="400"></canvas> 5 <canvas id="mycanvas" width="600" height="400"></canvas>
6 <script> 6 <script>
7 if (window.testRunner) 7 if (window.testRunner)
8 testRunner.dumpAsText(true); 8 testRunner.dumpAsText(true);
9 9
10 var canvas = document.getElementById('mycanvas'); 10 var canvas = document.getElementById('mycanvas');
(...skipping 25 matching lines...) Expand all
36 if (i == startAngles.length) { 36 if (i == startAngles.length) {
37 anticlockwise = true; 37 anticlockwise = true;
38 sign = -1; 38 sign = -1;
39 } 39 }
40 startAngle = startAngles[i % startAngles.length] * sign; 40 startAngle = startAngles[i % startAngles.length] * sign;
41 ctx.save(); 41 ctx.save();
42 for (var j = 0; j < sweepAngles.length; j++) { 42 for (var j = 0; j < sweepAngles.length; j++) {
43 ctx.save(); 43 ctx.save();
44 ctx.beginPath(); 44 ctx.beginPath();
45 ctx.moveTo(0, 2); 45 ctx.moveTo(0, 2);
46 ctx.arc(18, 15, 10, startAngle, startAngle + (sweepAngles[j] * sign), an ticlockwise); 46 ctx.ellipse(18, 15, 8, 12, Math.PI / 4, startAngle, startAngle + (sweepA ngles[j] * sign), anticlockwise);
47 ctx.lineTo(0, 28); 47 ctx.lineTo(0, 28);
48 ctx.stroke(); 48 ctx.stroke();
49 ctx.restore(); 49 ctx.restore();
50 ctx.translate(30, 0); 50 ctx.translate(30, 0);
51 } 51 }
52 ctx.restore(); 52 ctx.restore();
53 ctx.translate(0, 40); 53 ctx.translate(0, 40);
54 } 54 }
55 55
56 </script> 56 </script>
57 </body> 57 </body>
58 </html> 58 </html>
59
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698