Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.1.0
-
None
-
Windows 7 32-bit, fully patched
[Qt 5.1.0 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB)|http://download.qt-project.org/official_releases/qt/5.1/5.1.0/qt-windows-opensource-5.1.0-mingw48_opengl-x86-offline.exe]
Description
This code on Windows:
#include <QCoreApplication> #include <QImage> #include <QPainter> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QImage img(200, 200, QImage::Format_ARGB32_Premultiplied); img.fill(Qt::transparent); QPainter p(&img); p.setPen(QPen(Qt::yellow, 3)); p.drawLine(50, 50, 100, 50); p.end(); img.save("example.png"); return 0; }
When built and run as Debug program produces an image with a 3 pixel wide line (expected). When built and run as Release program produces an image with a 2 pixel wide line (unexpected). See attached images.
On Linux the problem does not manifest.
This seems to appear only when the width is an odd integer.
Attachments
Issue Links
- replaces
-
QTBUG-32376 QPainter::drawLine draws lines with incorrect width / Raster paint engine
- Closed