Uploaded image for project: 'Qt for MCUs'
  1. Qt for MCUs
  2. QTMCU-13

Opacity on scale/rotated image show only 1 or 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • Qt for MCUs 1.5
    • Qt for MCUs 1.5
    • QML, QML Engine
    • None
    • All
    • 1
    • UL Sprint 3.7

      An Image/ColorizedImage that is either scaled or rotated (via scale/rotation property or via transform property, or by setting width/height other than image size) does only show 1 or 0 as  correct opacity value. Every opacity value in between is always shown completly transparent like opacity is set to 0.

      Qml test code should fade from opaque to transparent and back, but due to this bug there is no fading, just a change btween transparent and opaque:

      Rectangle {
          id: parentRect
          color: "black"
          width: 1280
          height: 720
      
          MouseArea{
              anchors.fill: parent
              onClicked: image.opacity = (image.opacity === 0? 1 : 0)
          }
      
          Image{
              id: image
              source: "Test.png"
              transform: Scale{xScale:2; yScale: 2}
              Behavior on opacity{NumberAnimation{duration: 500}}
          }
      }
      

      This effect is regardless whether resource compression or optimization is enabled or disabled

        1. image-2020-09-24-17-28-54-272.png
          image-2020-09-24-17-28-54-272.png
          102 kB
        2. Test.zip
          3 kB
        3. Test-qml.mp4
          945 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            ckamm Christian Kamm
            _joerg_ Jörg Hedrich
            Daniel Drozdz Daniel Drozdz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes