diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-07-31 13:29:40 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-08-08 12:44:23 +0000 |
commit | 0047b3bdc0938077d7049f4103f835b52897b93a (patch) | |
tree | 346956ce402d8d244d67c7f477df8763174a5ae1 /tests/auto/quick/qquickshape/data | |
parent | 003e24d72a9647e2dc397906234059fee19103ec (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 'tests/auto/quick/qquickshape/data')
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem6.png | bin | 0 -> 11024 bytes | |||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem6.qml | 35 |
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickshape/data/pathitem6.png b/tests/auto/quick/qquickshape/data/pathitem6.png Binary files differnew file mode 100644 index 0000000000..d9e53d6c00 --- /dev/null +++ b/tests/auto/quick/qquickshape/data/pathitem6.png diff --git a/tests/auto/quick/qquickshape/data/pathitem6.qml b/tests/auto/quick/qquickshape/data/pathitem6.qml new file mode 100644 index 0000000000..fafcc48196 --- /dev/null +++ b/tests/auto/quick/qquickshape/data/pathitem6.qml @@ -0,0 +1,35 @@ +import QtQuick 2.9 +import tst_qquickpathitem 1.0 + +Item { + width: 200 + height: 150 + + Shape { + vendorExtensionsEnabled: false + objectName: "pathItem" + anchors.fill: parent + + ShapePath { + strokeWidth: 4 + strokeColor: "red" + fillGradient: ConicalGradient { + centerX: 100; centerY: 100; angle: 45 + 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" } + } + fillColor: "blue" // ignored with the gradient set + strokeStyle: ShapePath.DashLine + dashPattern: [ 1, 4 ] + startX: 20; startY: 20 + PathLine { x: 180; y: 130 } + PathLine { x: 20; y: 130 } + PathLine { x: 20; y: 20 } + } + } +} |