From 003e24d72a9647e2dc397906234059fee19103ec Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 28 Jul 2017 13:44:09 +0200 Subject: shapes: Add support for radial gradients Task-number: QTBUG-61857 Change-Id: I580e503d8266a9dca69bb542c22228df4ff4bf94 Reviewed-by: Eskil Abrahamsen Blomfeldt --- tests/manual/shapestest/shapestest.qml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'tests/manual') diff --git a/tests/manual/shapestest/shapestest.qml b/tests/manual/shapestest/shapestest.qml index df53f088ae..d3f946b227 100644 --- a/tests/manual/shapestest/shapestest.qml +++ b/tests/manual/shapestest/shapestest.qml @@ -372,6 +372,35 @@ Rectangle { } } } + + Rectangle { + border.color: "purple" + color: "transparent" + width: 200 + height: 100 + Shape { + anchors.fill: parent + ShapePath { + strokeWidth: -1 + strokeColor: "red" + fillGradient: RadialGradient { + centerX: 100; centerY: 50 + focalX: centerX; focalY: centerY + centerRadius: 50 + spread: RadialGradient.ReflectSpread + GradientStop { position: 0; color: "blue" } + GradientStop { position: 0.2; color: "green" } + GradientStop { position: 0.4; color: "red" } + GradientStop { position: 0.6; color: "yellow" } + GradientStop { position: 1; color: "cyan" } + } + PathLine { x: 0; y: 100 } + PathLine { x: 200; y: 100 } + PathLine { x: 200; y: 0 } + PathLine { x: 0; y: 0 } + } + } + } } } -- cgit v1.2.3