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

Scaling QTransform::mapRect(QRect) can differ from mapRect(QRectF).toRect()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.5, 5.13.2, 5.14.0 Alpha
    • Fix Version/s: None
    • Component/s: GUI: Painting
    • Labels:
      None

      Description

      If only scaling, QTransform::mapRect(QRect) rounds x1 and width, while mapRect(QRectF).toRect() in effect rounds x1 and x2. This can give a one pixel difference in resulting width and/or height.

      Possibly risky to change in Qt 5, but should at least be doable for Qt 6.

       

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                vgt Eirik Aavitsland
                Reporter:
                vgt Eirik Aavitsland
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes