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

Side by Side Diff: LayoutTests/fast/canvas/canvas-ellipse-360-winding-expected.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 src="script-tests/js-ellipse-implementation.js"></script>
7 <script>
8 var canvas = document.getElementById('mycanvas');
9 var ctx = canvas.getContext('2d');
10
11 var r;
12 var anticlockwise = true;
13 ctx.beginPath();
14 for (r = 200; r >= 10; r -= 20) {
15 ctx.moveTo(150 + r, 75);
16 ellipseUsingArc(ctx, 150, 75, r, r * 1.2, 0, 0, Math.PI * 2, anticlockwise);
17 ctx.closePath();
18 anticlockwise = !anticlockwise;
19 }
20 ctx.fillStyle = 'rgba(0, 255, 0, 1)';
21 ctx.strokeStyle = 'rgba(0, 255, 0, 1)';
22 ctx.fill();
23 ctx.stroke();
24 </script>
25 </body>
26 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698