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

Dash pattern with pen width 1 not rendered correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.2.1
    • GUI: Painting
    • None
    • Windows 7 32- and 64-bit.

    Description

      A custom dash pattern (QPen::setDashPattern) with pen width 1 is not rendered correctly. The dash and space length are supposed to be rendered relative to the pen width, but with pen width 1 it appears Qt is computing the number of pixels to paint, and using this number regardless of the angle of the dashed line. For example, a dash at 45 degrees has length equal to projection on x or y axis multiplied by sqrt(2). The length should be consistent regardless of angle.
      There is a workaround to adjust the lengths if the pen width is 1.
      This problem appeared when we transitioned from Qt4.6.1 to Qt5.2.1.

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            dericstone Deric Stone
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes