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

Broken rendering of semi-transparent text and incorrect antialiasing of QStaticText objects with large fonts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 4.7.0
    • GUI: Painting
    • None
    • Qt 4.7.0 on 64-bit Windows XP.
      All Qt rendering parameters except ones set in the test code are at their default values.

    Description

      The attached test application has QGraphicsScene with one item that consists of:

      • rectangle to show the item's bounds;
      • semi-transparent text using QPainter::drawStaticText() (left digit) and QPainter::drawText() (right digit) functions.

      The left part of the screenshot shows the result of calling QPainter::setPen() before drawing the rectangle.
      As you can see, drawText() draws text correctly only when the font is large, while drawStaticText() completely ignores pen color and/or transparency.

      On the right part of the screenshot you can see the result of calling setPen() after drawing the rectangle and scrolling the view upwards from the position when the item is out of view area.
      In this case drawStaticText() and drawText() with small font create artifacts at the top edge of the view. drawText() with large font works correctly.

      Also, drawStaticText() does only partial antialiasing — all lines except nearly-vertical ones are aliased.

      Attachments

        1. drawstatictext.png
          drawstatictext.png
          2 kB
        2. main.cpp
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            dinosaur Constantin Makshin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes