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

QPainter does not skip zero-pixel thin subareas when antialiasing is enabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.9.1
    • GUI: Painting
    • None

    Description

      Hello,

      The issue happens with QPainterPath s includes holes which have segments that touch (or are very close to) segments of the outer path. Filling those paths "produces" subareas which have width of zero or almost zero pixels. When not using antialiasing, such subareas are completely skipped (as expected) - see the left column on the screenshot attached. When antialiasing is on, however, an "antialiasing border" appears, and this "border" is much thicker than a subarea - see the top and bottom images the right column on the screenshot.

      Using QPainterPath::simplified() on this test case (central image in the right column on the screenshot) does eliminate the problem for this specific test case but we can't use it as a generic workaround due to its own problems (which I'll try to report separately).

      I believe this a different issue than --QTBUG-20797-- or QTBUG-44068-- since it happens when we're painting one shape and not a composition of painting different shapes.

      To reproduce the screenshot, compile the test case and run it as e.g.: $ ./aexe 0.01. Using a different sub-pixel argument (e.g. 0, -0.75 etc.) produces the same result.

      Attachments

        Issue Links

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

          Activity

            People

              sletta Gunnar Sletta
              jive Ievgen Liubymkin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes