Commit 76ad043e authored by eric@webkit.org's avatar eric@webkit.org

2010-06-04 Qi Zhang <qi.2.zhang@nokia.com>

        Reviewed by Laszlo Gombos.

        [Qt] failed at http://philip.html5.org/tests/canvas/suite/tests/2d.path.arc.angle.3.html
        https://bugs.webkit.org/show_bug.cgi?id=38537

        Remove canvas/philip/tests/2d.path.arcTo.2d.path.arc.angle.3.html and
        canvas/philip/tests/2d.path.arcTo.2d.path.arc.angle.5.html from Skipped.

        * platform/qt/Skipped:
2010-06-04  Qi Zhang  <qi.2.zhang@nokia.com>

        Reviewed by Laszlo Gombos.

        [Qt] failed at http://philip.html5.org/tests/canvas/suite/tests/2d.path.arc.angle.3.html
        https://bugs.webkit.org/show_bug.cgi?id=38537

        For path.arc function handle span > 2PI

        * platform/graphics/qt/PathQt.cpp:
        (WebCore::Path::addArc):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 155dd173
2010-06-04 Qi Zhang <qi.2.zhang@nokia.com>
Reviewed by Laszlo Gombos.
[Qt] failed at http://philip.html5.org/tests/canvas/suite/tests/2d.path.arc.angle.3.html
https://bugs.webkit.org/show_bug.cgi?id=38537
Remove canvas/philip/tests/2d.path.arcTo.2d.path.arc.angle.3.html and
canvas/philip/tests/2d.path.arcTo.2d.path.arc.angle.5.html from Skipped.
* platform/qt/Skipped:
2010-06-04 Zhenyao Mo <zmo@google.com>
Reviewed by Dimitri Glazkov.
......
......@@ -5135,8 +5135,6 @@ canvas/philip/tests/2d.line.join.open.html
canvas/philip/tests/2d.line.join.parallel.html
canvas/philip/tests/2d.line.miter.lineedge.html
canvas/philip/tests/2d.missingargs.html
canvas/philip/tests/2d.path.arc.angle.3.html
canvas/philip/tests/2d.path.arc.angle.5.html
canvas/philip/tests/2d.path.arc.twopie.3.html
canvas/philip/tests/2d.path.arc.zeroradius.html
canvas/philip/tests/2d.path.arcTo.collinear.2.html
......
2010-06-04 Qi Zhang <qi.2.zhang@nokia.com>
Reviewed by Laszlo Gombos.
[Qt] failed at http://philip.html5.org/tests/canvas/suite/tests/2d.path.arc.angle.3.html
https://bugs.webkit.org/show_bug.cgi?id=38537
For path.arc function handle span > 2PI
* platform/graphics/qt/PathQt.cpp:
(WebCore::Path::addArc):
2010-06-04 Zhenyao Mo <zmo@google.com>
Reviewed by Dimitri Glazkov.
......
......@@ -286,16 +286,24 @@ void Path::addArc(const FloatPoint& p, float r, float sar, float ear, bool antic
double width = radius*2;
double height = radius*2;
if (!anticlockwise && (ea < sa))
span += 360;
else if (anticlockwise && (sa < ea))
span -= 360;
// this is also due to switched coordinate system
// we would end up with a 0 span instead of 360
if (!(qFuzzyCompare(span + (ea - sa) + 1, 1.0) &&
qFuzzyCompare(qAbs(span), 360.0))) {
span += ea - sa;
if ((!anticlockwise && (ea - sa >= 360)) || (anticlockwise && (sa - ea >= 360)))
// If the anticlockwise argument is false and endAngle-startAngle is equal to or greater than 2*PI, or, if the
// anticlockwise argument is true and startAngle-endAngle is equal to or greater than 2*PI, then the arc is the whole
// circumference of this circle.
span = 360;
else {
if (!anticlockwise && (ea < sa))
span += 360;
else if (anticlockwise && (sa < ea))
span -= 360;
// this is also due to switched coordinate system
// we would end up with a 0 span instead of 360
if (!(qFuzzyCompare(span + (ea - sa) + 1, 1.0)
&& qFuzzyCompare(qAbs(span), 360.0))) {
// mod 360
span += (ea - sa) - (static_cast<int>((ea - sa) / 360)) * 360;
}
}
// If the path is empty, move to where the arc will start to avoid painting a line from (0,0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment