Use more numerically robust algorithm to compute QBezier::pointAt().
authorAlan Alpert <alan.alpert@nokia.com>
Tue, 2 Aug 2011 01:26:24 +0000 (11:26 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 5 Aug 2011 08:55:30 +0000 (10:55 +0200)
commit4334d07f52dfc1d7fce6ebbad6e9f377ef33dedb
treeca1e4d1db6318675e3851bdb130b1cd08940cb95
parent1eea4773236a246cf6185f69374c27852905ff5e
Use more numerically robust algorithm to compute QBezier::pointAt().

QBezier::pointAt() could potentially return values outside the bezier's
bounds, even when the bezier was a straight horizontal line. For
example, with y = 0.5, it would produce y=0.5 or y=0.49999999999999 for
different values of t, which when rounded cause jittering in a QML
PathView.

Task-number: QTBUG-17007
Task-number: QTBUG-18133
Cherry-pick-of: 8b66982ec7b4b5d2071931c288973dce73dc9875
Change-Id: I4ecac7b9085aaaaaaaaaaaaaaaaaaaaaa7d7b0bc
Reviewed-on: http://codereview.qt.nokia.com/2467
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/gui/painting/qbezier_p.h
tests/auto/qpainterpath/tst_qpainterpath.cpp