diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-28 12:13:09 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-28 12:13:09 (GMT) |
commit | e1dd37f6b54881aef3b9e1e686dc56bb96fc14ed (patch) | |
tree | 60edf1cbcf7c0af6be2af693ede84a04b9feae04 /examples | |
parent | 1a2a1418a201874b88afeb4d7fbe740b31376585 (diff) | |
download | Qt-e1dd37f6b54881aef3b9e1e686dc56bb96fc14ed.zip Qt-e1dd37f6b54881aef3b9e1e686dc56bb96fc14ed.tar.gz Qt-e1dd37f6b54881aef3b9e1e686dc56bb96fc14ed.tar.bz2 |
Add graphics effects support
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/effects/pic.jpg | bin | 0 -> 7016 bytes | |||
-rw-r--r-- | examples/declarative/effects/test.qml | 75 |
2 files changed, 75 insertions, 0 deletions
diff --git a/examples/declarative/effects/pic.jpg b/examples/declarative/effects/pic.jpg Binary files differnew file mode 100644 index 0000000..5775518 --- /dev/null +++ b/examples/declarative/effects/pic.jpg diff --git a/examples/declarative/effects/test.qml b/examples/declarative/effects/test.qml new file mode 100644 index 0000000..4cc8746 --- /dev/null +++ b/examples/declarative/effects/test.qml @@ -0,0 +1,75 @@ +import Qt 4.6 + +Rectangle { + color: "white" + width: 800 + height: 600 + + Image { + source: "pic.jpg" + + effect: Blur { + blurRadius: NumberAnimation { id: BS; from: 0; to: 10; duration: 200; repeat: true } + } + + MouseRegion { anchors.fill: parent; onClicked: BS.running = !BS.running } + + Text { color: "white"; text: "Blur" } + } + + Image { + source: "pic.jpg" + + x: 200 + effect: Grayscale {} + + Text { color: "white"; text: "Grayscale" } + } + + Image { + source: "pic.jpg" + + x: 400 + effect: Colorize { color: "blue" } + + Text { color: "white"; text: "Colorize" } + } + + Image { + source: "pic.jpg" + + y: 300 + effect: Pixelize { + pixelSize: NumberAnimation { id: PS; from: 0; to: 10; duration: 200; repeat: true } + } + + MouseRegion { anchors.fill: parent; onClicked: PS.running = !PS.running } + + Text { color: "white"; text: "Pixelize" } + } + + + Image { + source: "pic.jpg" + + x: 200 + y: 300 + effect: DropShadow { + blurRadius: 3 + offset.x: 3 + offset.y: NumberAnimation { id: DS; from: 0; to: 10; duration: 200; repeat: true; } + } + + MouseRegion { anchors.fill: parent; onClicked: DS.running = !DS.running } + + Text { color: "white"; text: "DropShadow" } + } + + + Text { + x: 400; y: 300 + text: "Clicking Blur, Pixelize or DropShadow will \ntoggle animation." + color: "black" + } + +} |