Changeset 71936 in webkit


Ignore:
Timestamp:
Nov 12, 2010 12:23:34 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-11-12 Helder Correia <helder@sencha.com>

Reviewed by Andreas Kling.

[Qt] Path::addArc() does not set right angle direction on full arcs
https://bugs.webkit.org/show_bug.cgi?id=49138

New test for nonzero winding rule correctness for full arc paths.

  • fast/canvas/canvas-arc-360-winding-expected.txt: Added.
  • fast/canvas/canvas-arc-360-winding.html: Added.
  • fast/canvas/script-tests/canvas-arc-360-winding.js: Added.

2010-11-12 Helder Correia <helder@sencha.com>

Reviewed by Andreas Kling.

[Qt] Path::addArc() does not set right angle direction on full arcs
https://bugs.webkit.org/show_bug.cgi?id=49138

Ensure correctness of nonzero winding rule for full arc paths.
Invert the sign of the span if the direction is counterclockwise.

Test: fast/canvas/canvas-arc-360-winding.html

  • platform/graphics/qt/PathQt.cpp: (WebCore::Path::addArc):
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r71934 r71936  
     12010-11-12  Helder Correia  <helder@sencha.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] Path::addArc() does not set right angle direction on full arcs
     6        https://bugs.webkit.org/show_bug.cgi?id=49138
     7
     8        New test for nonzero winding rule correctness for full arc paths.
     9
     10        * fast/canvas/canvas-arc-360-winding-expected.txt: Added.
     11        * fast/canvas/canvas-arc-360-winding.html: Added.
     12        * fast/canvas/script-tests/canvas-arc-360-winding.js: Added.
     13
    1142010-11-05  Dimitri Glazkov  <dglazkov@chromium.org>
    215
  • trunk/WebCore/ChangeLog

    r71934 r71936  
     12010-11-12  Helder Correia  <helder@sencha.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] Path::addArc() does not set right angle direction on full arcs
     6        https://bugs.webkit.org/show_bug.cgi?id=49138
     7
     8        Ensure correctness of nonzero winding rule for full arc paths.
     9        Invert the sign of the span if the direction is counterclockwise.
     10
     11        Test: fast/canvas/canvas-arc-360-winding.html
     12
     13        * platform/graphics/qt/PathQt.cpp:
     14        (WebCore::Path::addArc):
     15
    1162010-11-05  Dimitri Glazkov  <dglazkov@chromium.org>
    217
  • trunk/WebCore/platform/graphics/qt/PathQt.cpp

    r70992 r71936  
    291291    double height = radius*2;
    292292
    293     if ((!anticlockwise && (ea - sa >= 360)) || (anticlockwise && (sa - ea >= 360)))
     293    if ((!anticlockwise && (ea - sa >= 360)) || (anticlockwise && (sa - ea >= 360))) {
    294294        // If the anticlockwise argument is false and endAngle-startAngle is equal to or greater than 2*PI, or, if the
    295295        // anticlockwise argument is true and startAngle-endAngle is equal to or greater than 2*PI, then the arc is the whole
    296296        // circumference of this circle.
    297297        span = 360;
    298     else {
     298
     299        if (anticlockwise)
     300            span = -span;
     301    } else {
    299302        if (!anticlockwise && (ea < sa))
    300303            span += 360;
Note: See TracChangeset for help on using the changeset viewer.