Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-6996

PDF documents are not correctly written out.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 4.6.0
    • GUI: Painting
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            ponto Christoph Bartoschek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes