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

When rendering a pen width of 0 to PDF it is not rendered correctly with the dotted line

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 4.7.4
    • GUI: Printing
    • None
    • Windows 7

    Description

      This is a Windows specific bug. Attached code snippet can be used to reproduce the problem. The scaling shouldn't effect at all but it is.

      QPrinter* printer = new QPrinter();
      printer->setOutputFileName("print.pdf");
      printer->setOutputFormat(QPrinter::PdfFormat);

      QPainter painter(printer);
      QPen pen;
      pen.setStyle(Qt::DotLine);
      pen.setWidth(0);
      pen.setBrush(Qt::black);

      painter.setPen(pen);
      painter.scale(1.95, 1.95);
      painter.drawRect(QRect(50, 200, 500, 25));
      painter.end();

      Attachments

        Issue Links

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

          Activity

            People

              johnlayt John Layt
              qtcomsupport Qt Support
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes