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

Image sourceSize binding causes the size to become smaller unexpectedly

XMLWordPrintable

      Following will make rendered svg smaller by device pixel ratio (ie. at 2x will become half size):

      Image {
        source: "file.svg"
        sourceSize: Qt.size(width,height)
      }
      

      Looks like it is evaluated before the final size is known, which is expected, so it sets it 0x0 initially. But after the image is loaded, the size reported by width and height properties seems to be half the expected size at 2x scale ratio.

        1. qtbug81018.tar.gz
          4 kB
          Joni Poikelin
        2. rect.svg
          18 kB
          Eirik Aavitsland
        3. dprtest.qml
          0.4 kB
          Eirik Aavitsland
        4. Screenshot from 2021-10-14 11-06-35.png
          54 kB
          Mitch Curtis
        5. comparison.qml
          2 kB
          Eirik Aavitsland
        6. zero.png
          2 kB
          Eirik Aavitsland
        7. qtbug94901-ubuntu-DPR-2-before-and-after.png
          119 kB
          Mitch Curtis
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            mitch_curtis Mitch Curtis
            poikelin Joni Poikelin
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes