aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/shapes/radialGradient.qml
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2023-09-27 10:47:54 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-09-28 09:45:43 +0000
commit9f266bf2d86cac4888e826c874bedd0bed9b0ece (patch)
tree625e0ef7277602d415df197bdb4ec724a115ca00 /examples/quick/shapes/radialGradient.qml
parent2939750ba7cc9aebf94b8b0c7d5b8e0720aa3616 (diff)
Rename shapes example qml files according to what they demonstrate
Amends 270a6f9bba75478204dc6aadb348cf34a195a4da Fixes: QTBUG-115485 Pick-to: 6.2 Change-Id: Id77b4dd8ce83175ebe29d24bf987572d5e9069d7 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 251fdf01a65a52414dd9183308520efbbd731567) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit f3b39f0cc8ac19326c9341b07fe91c8bf885a642)
Diffstat (limited to 'examples/quick/shapes/radialGradient.qml')
-rw-r--r--examples/quick/shapes/radialGradient.qml103
1 files changed, 63 insertions, 40 deletions
diff --git a/examples/quick/shapes/radialGradient.qml b/examples/quick/shapes/radialGradient.qml
index cb89be7e6b..87db319c9a 100644
--- a/examples/quick/shapes/radialGradient.qml
+++ b/examples/quick/shapes/radialGradient.qml
@@ -15,30 +15,80 @@ Rectangle {
ShapePath {
strokeWidth: 4
strokeColor: "red"
- fillGradient: LinearGradient {
- x1: 20
- y1: 20
- x2: 180
- y2: 130
+ fillGradient: RadialGradient {
+ centerX: 100
+ centerY: 100
+ centerRadius: 100
+ SequentialAnimation on focalRadius {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: 1
+ to: 20
+ duration: 2000
+ }
+ NumberAnimation {
+ from: 20
+ to: 1
+ duration: 2000
+ }
+ }
+ SequentialAnimation on focalX {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: 50
+ to: 150
+ duration: 3000
+ }
+ NumberAnimation {
+ from: 150
+ to: 50
+ duration: 3000
+ }
+ }
+ SequentialAnimation on focalY {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: 50
+ to: 150
+ duration: 1000
+ }
+ NumberAnimation {
+ from: 150
+ to: 50
+ duration: 1000
+ }
+ }
GradientStop {
position: 0
- color: "blue"
+ color: "#ffffff"
+ }
+ GradientStop {
+ position: 0.11
+ color: "#f9ffa0"
+ }
+ GradientStop {
+ position: 0.13
+ color: "#f9ff99"
}
GradientStop {
- position: 0.2
- color: "green"
+ position: 0.14
+ color: "#f3ff86"
}
GradientStop {
- position: 0.4
- color: "red"
+ position: 0.49
+ color: "#93b353"
}
GradientStop {
- position: 0.6
- color: "yellow"
+ position: 0.87
+ color: "#264619"
+ }
+ GradientStop {
+ position: 0.96
+ color: "#0c1306"
}
GradientStop {
position: 1
- color: "cyan"
+ color: "#000000"
}
}
fillColor: "blue" // ignored with the gradient set
@@ -59,32 +109,5 @@ Rectangle {
y: 20
}
}
- transform: Rotation {
- origin.x: 100
- origin.y: 50
- axis {
- x: 0
- y: 1
- z: 0
- }
- SequentialAnimation on angle {
- NumberAnimation {
- from: 0
- to: 75
- duration: 2000
- }
- NumberAnimation {
- from: 75
- to: -75
- duration: 4000
- }
- NumberAnimation {
- from: -75
- to: 0
- duration: 2000
- }
- loops: Animation.Infinite
- }
- }
}
}