Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
4.6.0
-
None
Description
The following program does not create the intended PDF-Document if you print into a PDF-File:
#include <QtGui> int main(int argc, char *argv[]) { QApplication app(argc, argv); QPrinter printer; QPrintDialog printDialog(&printer, 0); if (printDialog.exec() == QDialog::Accepted) { QPainter painter(&printer); painter.setPen(Qt::green); painter.setBrush(QBrush(Qt::red)); painter.drawRect(QRectF(0.0, 0.0, 10.0, 10.0)); painter.setMatrix(QMatrix(100000000000.0, 0.0, 0.0, 100000000000.0, 0.0, 0.0)); painter.setPen(Qt::blue); painter.setBrush(QBrush(Qt::yellow)); painter.drawRect(QRectF(0.0000000002, 0.0, 0.0000000001, 0.0000000001)); painter.setPen(Qt::blue); painter.setBrush(QBrush(Qt::black)); painter.drawRect(QRectF(0.0000000004, 0.0, 0.0000000001, 0.0000000001)); painter.end(); } return 0; }
The result should show three squares in the upper left corner. However one only sees the first rectangle.
This bug is related to bug 1169: http://bugreports.qt.nokia.com/browse/QTBUG-1169
The fix for bug 1169 is broken. It only covers the testcase in that bug. A general fix prints all real numbers correctly.