Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.4.2
-
OpenSuse 13.1 32-bit 3.11.10-7-desktop #1 SMP PREEMPT Mon Feb 3 09:41:24 UTC 2014 (750023e) i686 athlon i386 GNU/Linux
Qt has been compiled from source using the following options:
./configure -prefix /usr/local/Qt-5.2.1-openGL-static -release -opensource -confirm-license -static -largefile -no-javascript-jit -no-qml-debug -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -no-harfbuzz -no-openssl -qt-pcre -qt-xcb -qt-xkbcommon -no-compile-examples -gui -widgets -no-nis -cups -strip -no-dbus -nomake tools -nomake examples -nomake tests
OpenSuse 13.1 32-bit 3.11.10-7-desktop #1 SMP PREEMPT Mon Feb 3 09:41:24 UTC 2014 (750023e) i686 athlon i386 GNU/Linux Qt has been compiled from source using the following options: ./configure -prefix /usr/local/Qt-5.2.1-openGL-static -release -opensource -confirm-license -static -largefile -no-javascript-jit -no-qml-debug -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -no-harfbuzz -no-openssl -qt-pcre -qt-xcb -qt-xkbcommon -no-compile-examples -gui -widgets -no-nis -cups -strip -no-dbus -nomake tools -nomake examples -nomake tests
-
fd6a2d1c8ff0488757378080f6003c434fd68de2
Description
When drawing a diagonal line using QPainter::DrawLine() with a linewidth of 1, the start and end coördinates are of by one.
Examples:
painter.drawLine(2, 7, 6, 1);
Qt 4.8.5: a line will be drawn from x2, y7 to x6, y1
This is exactly as advertised in the Qt5 doc: http://qt-project.org/doc/qt-5/coordsys.html
Qt 5.2.1: a line will be drawn from x1, y7 to x5, y1
painter.drawLine(10, 10, 16, 4); (a line with an angle of exactly 45 degrees)
Qt 4.8.5: a line will be drawn from x10, y10 to x16, y4
Qt 5.2.1: a line will be drawn from x10, y9 to x16, y3
I provide a small project that demonstrates the problem.
I also provide some screenshots in PNG and XCF format (can be opened with The Gimp).
When compiled with Qt 4.8.5, the output of DrawLine() is as expected and as advertised in the Qt5 doc:
http://qt-project.org/doc/qt-5/coordsys.html