aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2/qquickitemlayer/data/RectangleEffect.qml
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2012-01-17 17:06:08 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-07 14:04:37 +0100
commit5cc1870d2084f4f9a291d92d3ccd99f2c18d6fca (patch)
treeb135d347d1349a79926f98e1a9c89450708fd616 /tests/auto/qtquick2/qquickitemlayer/data/RectangleEffect.qml
parentb057ac0a3f1bae9620f238363310a262b247e291 (diff)
Allow Item components to be assigned to Item.layer.effect.
Some complex effects are easier to implement as Items using ShaderEffects internally rather than with a top-level ShaderEffect. Auto-tests added. Change-Id: I4b99811b87e7ca5054bf119b99207b7f5a7c666e Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'tests/auto/qtquick2/qquickitemlayer/data/RectangleEffect.qml')
-rw-r--r--tests/auto/qtquick2/qquickitemlayer/data/RectangleEffect.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/qtquick2/qquickitemlayer/data/RectangleEffect.qml b/tests/auto/qtquick2/qquickitemlayer/data/RectangleEffect.qml
new file mode 100644
index 0000000000..94c43f2caf
--- /dev/null
+++ b/tests/auto/qtquick2/qquickitemlayer/data/RectangleEffect.qml
@@ -0,0 +1,22 @@
+import QtQuick 2.0
+
+Item {
+ width: 200
+ height: 200
+ Rectangle {
+ width: 100
+ height: 100
+ x: 50
+ y: 50
+ scale: 1.5
+ z: 1
+ rotation: 45
+ color: "#ff0000"
+ layer.enabled: true
+ layer.effect: Rectangle { color: "#0000ff" }
+ }
+ Rectangle {
+ anchors.fill: parent
+ color: "#00ff00"
+ }
+}