diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2011-09-30 09:04:11 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-30 10:37:05 +0200 |
commit | f32a83bfcf5a667a81fdd2020f119cdeec79a9f1 (patch) | |
tree | 8fd1c7e520743db050ff2369c0fdab1bbcbf6786 /src | |
parent | 3fff5e654e1b39844deae43cf5b211c2f196227f (diff) |
Fix issue with interpolating more than one path segment backwards.
Change-Id: I463010ed63d41be80db96e8306aef8caa3863ccf
Reviewed-on: http://codereview.qt-project.org/5821
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/util/qdeclarativepath.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativepath.cpp b/src/declarative/util/qdeclarativepath.cpp index f923413e29..05d56e0c1b 100644 --- a/src/declarative/util/qdeclarativepath.cpp +++ b/src/declarative/util/qdeclarativepath.cpp @@ -608,7 +608,8 @@ QPointF QDeclarativePath::backwardsPointAt(const QPainterPath &path, const qreal Q_ASSERT(!(currElement < firstElement)); currBez = nextBezier(path, &currElement, &bezLength, true /*reverse*/); currLength = prevLength; - epc = (currLength - bezLength) / pathLength; + prevLength = currLength - bezLength; + epc = prevLength / pathLength; } prevBez.element = currElement; prevBez.bezLength = bezLength; |