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

QPainter dashed lines are wrongly scaled for thin lines

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.1
    • GUI: Painting
    • None

    Description

      I use a QPainter to paint lines with a custom dash pattern onto a QImage.  This works as long as the line width is at least one pixel.  Otherwise, the dash pattern is scaled wrongly.  The attached small example program demonstrates the issue: It draws four lines with varying line width.  All four lines should have the same dash pattern, but the last pattern, corresponding to the line of widht 0.5, is wrong.

      Attachments

        1. dash-weirdness.ppm
          117 kB
          Oliver Sander
        2. investigate-dash-problem.cpp
          0.9 kB
          Oliver Sander
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            osander Oliver Sander
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes