aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/simplematerial/main.qml
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2012-12-12 20:11:12 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-07 10:44:02 +0100
commit077ad5f30446f6b3ccc38cb7f05897566f8e5eb7 (patch)
treedec3a47d3c2589b91299c2cbf975de041ed3b8bd /examples/quick/scenegraph/simplematerial/main.qml
parentb58eb5239452d282b7209784274714b25f530a3c (diff)
Documentation for scene graph examples.
Change-Id: Idb39fc0b6d5e538b90ae8a0b98d9f4d77e1fb617 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Diffstat (limited to 'examples/quick/scenegraph/simplematerial/main.qml')
-rw-r--r--examples/quick/scenegraph/simplematerial/main.qml38
1 files changed, 24 insertions, 14 deletions
diff --git a/examples/quick/scenegraph/simplematerial/main.qml b/examples/quick/scenegraph/simplematerial/main.qml
index 70771a7c35..b90afdd63e 100644
--- a/examples/quick/scenegraph/simplematerial/main.qml
+++ b/examples/quick/scenegraph/simplematerial/main.qml
@@ -44,30 +44,40 @@ import QtQuick 2.0
import SimpleMaterial 1.0
Rectangle {
- width: 640
- height: 360
-
- gradient: Gradient {
- GradientStop { position: 0; color: "#00ffff" }
- GradientStop { position: 1; color: "#00ff00" }
- }
+ width: 320
+ height: 480
+ color: "black"
//! [1] //! [2]
- SimpleMaterialItem {
+ Column {
anchors.fill: parent
- SequentialAnimation on scale {
- NumberAnimation { to: 100; duration: 60000; easing.type: Easing.InCubic }
- NumberAnimation { to: 1; duration: 60000; easing.type: Easing.OutCubic }
- loops: Animation.Infinite
+
+ SimpleMaterialItem {
+ width: parent.width;
+ height: parent.height / 3;
+ color: "steelblue"
+ }
+
+ SimpleMaterialItem {
+ width: parent.width;
+ height: parent.height / 3;
+ color: "darkorchid"
}
- rotation: scale * 10 - 10
+ SimpleMaterialItem {
+ width: parent.width;
+ height: parent.height / 3;
+ color: "springgreen"
+ }
}
+
+
//! [2] //! [3]
Rectangle {
color: Qt.rgba(0, 0, 0, 0.8)
radius: 10
+ antialiasing: true
border.width: 1
border.color: "black"
anchors.fill: label
@@ -78,7 +88,7 @@ Rectangle {
id: label
color: "white"
wrapMode: Text.WordWrap
- text: "The background here is implemented as one QSGGeometryNode node which uses QSGSimpleMaterial to implement a mandlebrot fractal fill"
+ text: "These three gradient boxes are colorized using a custom material."
anchors.right: parent.right
anchors.left: parent.left
anchors.bottom: parent.bottom