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

Side by Side Diff: LayoutTests/fast/canvas/arc360.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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/canvas/canvas-ellipse.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <body> 1 <body>
2 <p>Test canvas arc() start / end points when the arc is >= 360 degrees. The resu lt should be a circle with two line segments connected to the left hand side, to wards the top left and bottom left corners. 2 <p>Test canvas arc() start / end points when the arc is >= 360 degrees. The resu lt should be a circle with two line segments connected to the left hand side, to wards the top left and bottom left corners.
3 <canvas id="mycanvas" width="400" height="400"></canvas> 3 <canvas id="mycanvas" width="400" height="400"></canvas>
4 <script> 4 <script>
5 if (window.testRunner) 5 if (window.testRunner)
6 testRunner.dumpAsText(true); 6 testRunner.dumpAsText(true);
7 7
8 var canvas = document.getElementById('mycanvas'); 8 var canvas = document.getElementById('mycanvas');
9 var ctx = canvas.getContext('2d'); 9 var ctx = canvas.getContext('2d');
10 var cx = 200, cy = 200, radius = 100; 10 var cx = 200, cy = 200, radius = 100;
11 function deg2rad(x) {
12 return x * 3.141592653589 / 180;
13 }
14 ctx.lineWidth = 10; 11 ctx.lineWidth = 10;
15 ctx.beginPath(); 12 ctx.beginPath();
16 ctx.moveTo(0, 100); 13 ctx.moveTo(0, 100);
17 ctx.arc(cx, cy, radius, deg2rad(-180), deg2rad(180), false); 14 ctx.arc(cx, cy, radius, -Math.PI, Math.PI, false);
18 ctx.lineTo(0, 300); 15 ctx.lineTo(0, 300);
19 ctx.stroke(); 16 ctx.stroke();
20 </script> 17 </script>
21 </body> 18 </body>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/canvas/canvas-ellipse.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698