[Webkit-unassigned] [Bug 55696] New: canvas arc() missing line to start of arc if swing is zero

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 3 12:09:13 PST 2011


           Summary: canvas arc() missing line to start of arc if swing is
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Canvas
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: caryclark at google.com
                CC: kling at webkit.org, mdelaney at apple.com

In https://bugs.webkit.org/show_bug.cgi?id=41420 Andreas Kling quotes
 "Zero-length line segments must be pruned before stroking a path.
Empty subpaths must be ignored."

And implemented this in CanvasRenderingContext2D::arc() by adding:
+    if (sa == ea)
+        return;

However, the context.arc description in the Canvas element spec at
http://dev.w3.org/html5/2dcontext/ reads:

"The arc(x, y, radius, startAngle, endAngle, anticlockwise) method
draws an arc. If the context has any subpaths, then the method must
add a straight line from the last point in the subpath to the start
point of the arc. In any case, it must draw the arc between the start
point of the arc and the end point of the arc, and add the start and
end points of the arc to the subpath."


"If the two points are the same, or if the radius is zero, then the
arc is defined as being of zero length in both directions."

This bug http://code.google.com/p/chromium/issues/detail?id=52059
containing this fragment:
   <canvas id="cvs" width="600" height="250" style="border: 1px
dashed black">[No canvas support]</canvas>
       co = document.getElementById("cvs").getContext('2d');

which shows that this change prevents the line from being drawn from
(100,100) to the arc start.

Opera, Firefox 3 and 4 draw this line, but Chrome and nightly Safari do not.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list