summaryrefslogtreecommitdiffstats
path: root/examples/shadereffectitem/test-colorize.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/shadereffectitem/test-colorize.qml')
-rw-r--r--examples/shadereffectitem/test-colorize.qml75
1 files changed, 75 insertions, 0 deletions
diff --git a/examples/shadereffectitem/test-colorize.qml b/examples/shadereffectitem/test-colorize.qml
new file mode 100644
index 0000000..3cf1577
--- /dev/null
+++ b/examples/shadereffectitem/test-colorize.qml
@@ -0,0 +1,75 @@
+import QtQuick 2.0
+import "Effectoids"
+
+
+Item {
+ width: 360
+ height: 540
+
+ Colorize {
+ source: effectRoot
+ id: colorizeEffect
+ color: "#c0c0ff"
+ intensity: 0
+ blending: false
+ }
+
+ Item {
+ width: 360
+ height: 540
+ id: effectRoot
+
+ Image {
+ anchors.fill: parent
+ source: "bg.png"
+ smooth: true
+ }
+
+ MovingBox {}
+ }
+
+ Rectangle {
+ id: popup
+ anchors.centerIn: colorizeEffect
+ gradient: Gradient {
+ GradientStop { position: 0; color: "white" }
+ GradientStop { position: 1; color: "#ffa080" }
+ }
+ width: 250
+ height: 100
+ radius: 40
+ border.color: "black"
+ border.width: 2
+ smooth: true
+ scale: 0
+ opacity: 0
+ rotation: 90
+ Text {
+ anchors.centerIn: parent
+ text: "SMS!!!!"
+ font.pixelSize: 60
+ }
+ }
+
+ property real transitionTime: 800;
+
+ SequentialAnimation {
+ loops: Animation.Infinite
+ ParallelAnimation { // fade in
+ NumberAnimation { target: popup; property: "opacity"; to: 0.7; duration: transitionTime }
+ NumberAnimation { target: popup; property: "scale"; to: 1; duration: transitionTime * 3; easing.type: Easing.OutElastic}
+ NumberAnimation { target: colorizeEffect; property: "intensity"; to: 1; duration: transitionTime }
+ }
+ PauseAnimation { duration: 2000 }
+ ParallelAnimation { // fade out
+ NumberAnimation { target: popup; property: "opacity"; to: 0; duration: transitionTime / 5 }
+ NumberAnimation { target: popup; property: "scale"; to: 0; duration: transitionTime / 5; easing.type: Easing.InOutCubic }
+ NumberAnimation { target: colorizeEffect; property: "intensity"; to: 0; duration: transitionTime / 5 }
+ }
+ running: true
+ }
+
+ Rectangle { x: 360; width: 1000; height: 1000; color: "black" }
+ Rectangle { y: 540; width: 1000; height: 1000; color: "black" }
+
+}