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

QTransform::transposed() creates transformation with wrong type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.11.0
    • Fix Version/s: 5.11.1
    • Component/s: GUI: Painting
    • Labels:
      None

      Description

      QTransform::transposed() creates a transposed matrix, but doesn't set the dirty flag.

      Because of this, a subsequent call to type() returns the type of the original transformation, which will mostly be wrong:

      QTransform t;
      t.translate(5, -5); // t.type() == TxTranslate
      QTransform tt = t.transposed();
      Q_ASSERT(tt.type() == QTransform::TxProject); // fails
      

      In transposing, dx := m31 will be swapped with m13 (and dy := m32 with m23): The transposed form of a translating QTransform will be a projection.

       

        Attachments

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

          Activity

            People

            Assignee:
            vgt Eirik Aavitsland
            Reporter:
            mhennings Martin Hennings
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes