QTI圖片顏色變化大小縮放實現
阿新 • • 發佈:2018-12-12
Image {
id: icon
source: "image.png"
visible: true
Colorize {
anchors.fill: parent
source: icon
hue: 0.1 - (158 - icon.width) / 58 * 0.1 //色調
saturation: 1 //飽和度
lightness: -0.2 //亮度
}
SequentialAnimation {
id: iconAnimation
property real widthEnd: 100
property real heightEnd: 90
ParallelAnimation {
NumberAnimation { target: icon; property: "width"; to: iconAnimation.widthEnd; duration: 300 }
NumberAnimation { target: icon; property: "height"; to: iconAnimation.heightEnd; duration: 300 }
}
}
}