blob: e292ba46f6644e3df58e5ed34cae4b1ea8d59eb2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import QtQuick 2.0
import QtGraphicalEffects 1.0
Item {
id: root
Image {
id: image
source: "images/bug.jpg"
anchors.centerIn: parent
visible: false
}
Image {
id: mask
source: "images/butterfly.png"
visible: false
}
OpacityMask {
id: effect;
source: image
maskSource: mask
anchors.fill: source
scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1;
}
}
|