summaryrefslogtreecommitdiffstats
path: root/basicsuite/Graphical Effects/effect_Glow.qml
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-04-26 11:15:56 +0200
committerGunnar Sletta <gunnar.sletta@digia.com>2013-04-26 12:18:28 +0300
commit87c5ac7bac247624bd4f074558fa3f212ce15f1e (patch)
treea1e642d971a3af47fb62b33ed012237ddf85407e /basicsuite/Graphical Effects/effect_Glow.qml
parent96c0d5069473e929d597a96ebac994a983acd0d1 (diff)
New shader demo, more suitable for touch and embedded
Change-Id: I48af8bc9c58930c26e822503c5c94c55690f37db Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'basicsuite/Graphical Effects/effect_Glow.qml')
-rw-r--r--basicsuite/Graphical Effects/effect_Glow.qml39
1 files changed, 39 insertions, 0 deletions
diff --git a/basicsuite/Graphical Effects/effect_Glow.qml b/basicsuite/Graphical Effects/effect_Glow.qml
new file mode 100644
index 0000000..dd7a078
--- /dev/null
+++ b/basicsuite/Graphical Effects/effect_Glow.qml
@@ -0,0 +1,39 @@
+import QtQuick 2.0
+import QtGraphicalEffects 1.0
+
+Item {
+
+ id: root
+
+ property real inputX: 0.5;
+ property real inputY: 0.2;
+
+ property real feedbackX: effect.radius
+ property real feedbackY: effect.spread
+
+ property string nameX: "Radius"
+ property string nameY: "Spread"
+
+ Image {
+ id: image
+ source: "images/butterfly.png"
+ anchors.centerIn: parent
+ visible: false
+ }
+
+ Glow {
+ id: effect;
+
+ source: image
+ anchors.fill: source
+
+ scale: source.height > root.height * 0.8 ? root.height / source.height * 0.8 : 1;
+
+ samples: 4
+
+ radius: root.inputX * 7
+ spread: root.inputY;
+
+ color: Qt.rgba(1, 0, 1, 1);
+ }
+}