Correctly position aliased lines with flat caps
authorLars Knoll <lars.knoll@nokia.com>
Fri, 19 Aug 2011 09:58:18 +0000 (11:58 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 31 Aug 2011 11:12:43 +0000 (13:12 +0200)
commit46ff3a4b1f0ee9fc87bafe2679f322aab689889c
tree90cfc482273d90c83e75bf21c929e2d2269d52a6
parentdd91701a502859e57a095fccebde502c6abc458b
Correctly position aliased lines with flat caps

The code was mispositioning lines by half a pixel, as it
added half a pixel offset and then rounded in addition.
This submit fixes this and also removes certain artifacts when
drawing rects at .5 pixel positions.

Lance now doesn't show any significant differences to the
4.7 rendering anymore.

Task-number: QTBUG-20199
Reviewed-by: Aavit
(cherry picked from commit 49409f612c47f30434aa809e4d2c963f1a6bb88a)

Change-Id: Iab3936e688eba16b82f5cdb4f36f54af807d78ea
Reviewed-on: http://codereview.qt.nokia.com/3260
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
src/gui/painting/qcosmeticstroker.cpp
src/gui/painting/qcosmeticstroker_p.h