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

QGraphicsTextItem font gets incorrectly clipped when a clip rect is set on the painter.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.10, 5.15.2
    • Fix Version/s: None
    • Component/s: GUI: Font handling
    • Labels:
      None
    • Platform/s:
      All

      Description

      The attached repro and gif shows the issue where text glyphs in a graphics scene gets clipped when another item is moved over them. This is because when moving a graphics item the clip rect is set to avoid repainting more than needed.

      I debugged it a bit and found 2 issues in the raster engine that contributed to this, see attached patch for a suggested fix. Not sure if it is the correct thing to do but from my debugging it seemed like the clip rect was always correct, and it only really fails for this case so I just assumed this code needed to be adjusted.

        Attachments

        1. font clipping.gif
          font clipping.gif
          376 kB
        2. font clipping patch.diff
          2 kB
        3. font clipping repro.cpp
          0.7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            esabraha Eskil Abrahamsen Blomfeldt
            Reporter:
            cyriuz Viktor Arvidsson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes