diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-07-31 11:52:57 +1000 |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-07-31 11:52:57 +1000 |
commit | aa9cf406d62004519ad54596e1c391f9a6439210 (patch) | |
tree | dd562b9c296981f2761b76623911be8496c7af84 /src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp | |
parent | 987aec28b950e1c9817a20a9dd71afc071cd93ea (diff) | |
parent | 56b6a5924008ab5cdbae36e9662eddba923acd5e (diff) |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp index fde6ea30b..39e243ecb 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp @@ -170,8 +170,8 @@ void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius) return; } - FloatPoint p1p0((p0.x() - p1.x()),(p0.y() - p1.y())); - FloatPoint p1p2((p2.x() - p1.x()),(p2.y() - p1.y())); + FloatPoint p1p0((p0.x() - p1.x()), (p0.y() - p1.y())); + FloatPoint p1p2((p2.x() - p1.x()), (p2.y() - p1.y())); float p1p0_length = sqrtf(p1p0.x() * p1p0.x() + p1p0.y() * p1p0.y()); float p1p2_length = sqrtf(p1p2.x() * p1p2.x() + p1p2.y() * p1p2.y()); @@ -216,7 +216,7 @@ void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius) float factor_p1p2 = tangent / p1p2_length; FloatPoint t_p1p2((p1.x() + factor_p1p2 * p1p2.x()), (p1.y() + factor_p1p2 * p1p2.y())); - FloatPoint orth_p1p2((t_p1p2.x() - p.x()),(t_p1p2.y() - p.y())); + FloatPoint orth_p1p2((t_p1p2.x() - p.x()), (t_p1p2.y() - p.y())); float orth_p1p2_length = sqrtf(orth_p1p2.x() * orth_p1p2.x() + orth_p1p2.y() * orth_p1p2.y()); float ea = acos(orth_p1p2.x() / orth_p1p2_length); if (orth_p1p2.y() < 0) @@ -300,7 +300,12 @@ bool Path::isEmpty() const { // Don't use QPainterPath::isEmpty(), as that also returns true if there's only // one initial MoveTo element in the path. - return m_path->elementCount() == 0; + return !m_path->elementCount(); +} + +bool Path::hasCurrentPoint() const +{ + return !isEmpty(); } String Path::debugString() const |