aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-07-31 13:29:40 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-08-08 12:44:23 +0000
commit0047b3bdc0938077d7049f4103f835b52897b93a (patch)
tree346956ce402d8d244d67c7f477df8763174a5ae1 /examples
parent003e24d72a9647e2dc397906234059fee19103ec (diff)
shapes: Add support for conical gradients
Task-number: QTBUG-61857 Change-Id: Iacefcc3b22b31ed3dbcfbf7f00c8b0ea51c63b95 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/shapes/content/item10.qml19
1 files changed, 18 insertions, 1 deletions
diff --git a/examples/quick/shapes/content/item10.qml b/examples/quick/shapes/content/item10.qml
index cb2444fe4b..e91342c2fe 100644
--- a/examples/quick/shapes/content/item10.qml
+++ b/examples/quick/shapes/content/item10.qml
@@ -66,7 +66,18 @@ Rectangle {
ShapePath {
strokeWidth: 4
strokeColor: "black"
- fillColor: "lightBlue"
+ fillGradient: ConicalGradient {
+ id: conGrad
+ centerX: 100; centerY: 75
+ NumberAnimation on angle { from: 0; to: 360; duration: 10000; loops: Animation.Infinite }
+ GradientStop { position: 0; color: "#00000000" }
+ GradientStop { position: 0.10; color: "#ffe0cc73" }
+ GradientStop { position: 0.17; color: "#ffc6a006" }
+ GradientStop { position: 0.46; color: "#ff600659" }
+ GradientStop { position: 0.72; color: "#ff0680ac" }
+ GradientStop { position: 0.92; color: "#ffb9d9e6" }
+ GradientStop { position: 1.00; color: "#00000000" }
+ }
startX: 50; startY: 100
PathCubic {
@@ -154,4 +165,10 @@ Rectangle {
}
}
}
+
+ Text {
+ anchors.right: parent.right
+ anchors.top: parent.top
+ text: "Conical gradient angle: " + Math.round(conGrad.angle)
+ }
}