Index: LayoutTests/fast/canvas/canvas-ellipse-zero-lineto-expected.html |
diff --git a/LayoutTests/fast/canvas/canvas-ellipse-zero-lineto-expected.html b/LayoutTests/fast/canvas/canvas-ellipse-zero-lineto-expected.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9dcf7b83d6f0500864cf53509161f948cc9c440d |
--- /dev/null |
+++ b/LayoutTests/fast/canvas/canvas-ellipse-zero-lineto-expected.html |
@@ -0,0 +1,71 @@ |
+<!DOCTYPE html> |
+<html> |
+<head></head> |
+<body> |
+<canvas id="mycanvas" width="400" height="400"></canvas> |
+<script> |
+var canvas = document.getElementById('mycanvas'); |
+var ctx = canvas.getContext('2d'); |
+ctx.lineWidth = 4; |
+ |
+// moveTo + empty ellipse (swing == 0) |
+ctx.translate(0, 20); |
+ctx.save(); |
+ctx.beginPath(); |
+ctx.moveTo(20, 0); |
+ellipseLineTo(ctx, 80, 0, 10, 20, Math.PI / 6, -Math.PI / 2, -Math.PI / 2, true); |
+ctx.stroke(); |
+ctx.restore(); |
+ |
+// moveTo + empty ellipse (radiusX == 0) |
+ctx.translate(0, 20); |
+ctx.save(); |
+ctx.beginPath(); |
+ctx.moveTo(20, 0); |
+ellipseLineTo(ctx, 80, 0, 0, 20, Math.PI / 6, -Math.PI / 2, Math.PI / 2, false); |
+ctx.stroke(); |
+ctx.restore(); |
+ |
+// moveTo + empty ellipse (radiusY == 0) |
+ctx.translate(0, 20); |
+ctx.save(); |
+ctx.beginPath(); |
+ctx.moveTo(20, 0); |
+ellipseLineTo(ctx, 80, 0, 10, 0, Math.PI / 6, -Math.PI / 2, Math.PI / 2, false); |
+ctx.stroke(); |
+ctx.restore(); |
+ |
+// empty ellipse (swing == 0) + lineTo |
+ctx.translate(0, 20); |
+ctx.save(); |
+ctx.beginPath(); |
+ellipseLineTo(ctx, 20, 0, 10, 20, Math.PI / 6, -Math.PI / 2, -Math.PI / 2, false); |
+ctx.lineTo(80, 0); |
+ctx.stroke(); |
+ctx.restore(); |
+ |
+// empty ellipse (radiusX == 0) + lineTo |
+ctx.translate(0, 20); |
+ctx.save(); |
+ctx.beginPath(); |
+ellipseLineTo(ctx, 20, 0, 0, 20, Math.PI / 6, -Math.PI / 2, Math.PI / 2, false); |
+ctx.lineTo(80, 0); |
+ctx.stroke(); |
+ctx.restore(); |
+ |
+// empty ellipse (radiusY == 0) + lineTo |
+ctx.translate(0, 20); |
+ctx.save(); |
+ctx.beginPath(); |
+ellipseLineTo(ctx, 20, 0, 10, 0, Math.PI / 6, -Math.PI / 2, Math.PI / 2, false); |
+ctx.lineTo(80, 0); |
+ctx.stroke(); |
+ctx.restore(); |
+ |
+function ellipseLineTo(context, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) |
+{ |
+ context.lineTo(x + radiusX * Math.cos(startAngle + rotation), y + radiusX * Math.sin(startAngle + rotation)); |
+} |
+</script> |
+</body> |
+</html> |