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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12.5, 5.13.2, 5.14.0 Alpha
    • GUI: Painting
    • 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

              vgt Eirik Aavitsland
              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