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

Unified Diff: LayoutTests/fast/canvas/script-tests/canvas-arc-connecting-line.js

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, 4 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/canvas/script-tests/canvas-arc-connecting-line.js
diff --git a/LayoutTests/fast/canvas/script-tests/canvas-arc-connecting-line.js b/LayoutTests/fast/canvas/script-tests/canvas-arc-connecting-line.js
index 576a6948f6fd7719e641236201e8e2cdebd0eaf9..0ffca0b3084f341ab157adccd4f7b528669b641e 100644
--- a/LayoutTests/fast/canvas/script-tests/canvas-arc-connecting-line.js
+++ b/LayoutTests/fast/canvas/script-tests/canvas-arc-connecting-line.js
@@ -5,16 +5,13 @@ document.body.appendChild(canvas)
canvas.setAttribute('width', '300');
canvas.setAttribute('height', '300');
var ctx = canvas.getContext('2d');
-function deg2rad(x) {
- return x * 3.141592653589 / 180;
-}
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.lineJoin = 'bevel';
ctx.lineWidth = 12;
ctx.beginPath();
-ctx.arc(200, 50, 40, deg2rad(90), deg2rad(-90), false);
-ctx.arc(100, 50, 40, deg2rad(90), deg2rad(-90), false);
+ctx.arc(200, 50, 40, Math.PI / 2, -Math.PI / 2, false);
+ctx.arc(100, 50, 40, Math.PI / 2, -Math.PI / 2, false);
ctx.stroke();
var imageData = ctx.getImageData(0, 0, 1, 1);

Powered by Google App Engine
This is Rietveld 408576698