[Bug 14421] Possible error in canvas Philip test 2d.path.stroke.prune.arc

https://www.w3.org/Bugs/Public/show_bug.cgi?id=14421

--- Comment #4 from Ben Wells <benwells@chromium.org> 2012-03-27 22:49:21 UTC ---
(In reply to comment #3)
> The method is defined as only adding the straight line if the path already
> contains a subpath, which it doesn't in this case.

The moveTo call before the arc will create a sub path:
http://www.w3.org/TR/2dcontext/#dom-context-2d-moveto

"The moveTo(x, y) method must create a new subpath with the specified point as
its first (and only) point."

More code from the test is below. The sections with arcTo and arc are, I
believe, intended to be equivalent. However as the arguments are treated
slightly differently they are not.

The first two arguments to arcTo describe a point on the arc. The first two
arguments to arc describe the center of the arc.

ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);

ctx.strokeStyle = '#f00';
ctx.lineWidth = 100;
ctx.lineCap = 'round';
ctx.lineJoin = 'round';

ctx.beginPath();
ctx.moveTo(50, 25);
ctx.arcTo(50, 25, 150, 25, 10);
ctx.stroke();

ctx.beginPath();
ctx.moveTo(50, 25);
ctx.arc(50, 25, 10, 0, 0, false);
ctx.stroke();

_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 27 March 2012 22:49:24 UTC