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

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

Issue 14298022: Add support for new canvas ellipse method. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Complete degenerateEllipse. Make canvas-ellipse-zero-lineto.html cover various degenerate edge caseā€¦ Created 7 years, 5 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head></head>
4 <body>
5 <canvas id="mycanvas" width="300" height="150"></canvas>
6 <script>
7 var canvas = document.getElementById('mycanvas');
8 var ctx = canvas.getContext('2d');
9
10 var r;
11 var anticlockwise = true;
12 ctx.beginPath();
13 for (r = 200; r >= 10; r -= 20) {
14 ctx.moveTo(150 + r, 75);
15 ctx.ellipse(150, 75, r, r * 1.2, 0, 0, Math.PI * 2, anticlockwise);
16 ctx.closePath();
17 anticlockwise = !anticlockwise;
18 }
19 ctx.fillStyle = 'rgba(0, 255, 0, 1)';
20 ctx.strokeStyle = 'rgba(0, 255, 0, 1)';
21 ctx.fill();
22 ctx.stroke();
23 </script>
24 </body>
25 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698