diff options
Diffstat (limited to 'tests/auto/quick/qquickshape/data')
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem1.qml | 5 | ||||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem2.qml | 7 | ||||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem3.png | bin | 0 -> 5214 bytes | |||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem3.qml | 33 | ||||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem4.png | bin | 0 -> 5713 bytes | |||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem4.qml | 56 | ||||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem5.png | bin | 0 -> 9377 bytes | |||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem5.qml | 37 | ||||
-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 |
10 files changed, 173 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickshape/data/pathitem1.qml b/tests/auto/quick/qquickshape/data/pathitem1.qml new file mode 100644 index 0000000000..29ca67b0bb --- /dev/null +++ b/tests/auto/quick/qquickshape/data/pathitem1.qml @@ -0,0 +1,5 @@ +import QtQuick 2.9 +import tst_qquickpathitem 1.0 + +Shape { +} diff --git a/tests/auto/quick/qquickshape/data/pathitem2.qml b/tests/auto/quick/qquickshape/data/pathitem2.qml new file mode 100644 index 0000000000..a255a37af6 --- /dev/null +++ b/tests/auto/quick/qquickshape/data/pathitem2.qml @@ -0,0 +1,7 @@ +import QtQuick 2.9 +import tst_qquickpathitem 1.0 + +Shape { + ShapePath { } + ShapePath { } +} diff --git a/tests/auto/quick/qquickshape/data/pathitem3.png b/tests/auto/quick/qquickshape/data/pathitem3.png Binary files differnew file mode 100644 index 0000000000..a8b4483c96 --- /dev/null +++ b/tests/auto/quick/qquickshape/data/pathitem3.png diff --git a/tests/auto/quick/qquickshape/data/pathitem3.qml b/tests/auto/quick/qquickshape/data/pathitem3.qml new file mode 100644 index 0000000000..8328f2fc33 --- /dev/null +++ b/tests/auto/quick/qquickshape/data/pathitem3.qml @@ -0,0 +1,33 @@ +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: LinearGradient { + x1: 20; y1: 20 + x2: 180; y2: 130 + 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" } + } + 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 } + } + } +} diff --git a/tests/auto/quick/qquickshape/data/pathitem4.png b/tests/auto/quick/qquickshape/data/pathitem4.png Binary files differnew file mode 100644 index 0000000000..3a988ba249 --- /dev/null +++ b/tests/auto/quick/qquickshape/data/pathitem4.png diff --git a/tests/auto/quick/qquickshape/data/pathitem4.qml b/tests/auto/quick/qquickshape/data/pathitem4.qml new file mode 100644 index 0000000000..635113416f --- /dev/null +++ b/tests/auto/quick/qquickshape/data/pathitem4.qml @@ -0,0 +1,56 @@ +import QtQuick 2.9 +import tst_qquickpathitem 1.0 + +Item { + width: 200 + height: 150 + + Shape { + vendorExtensionsEnabled: false + objectName: "pathItem" + anchors.fill: parent + + ShapePath { + strokeColor: "red" + fillColor: "green" + startX: 40; startY: 30 + PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 } + PathLine { x: 150; y: 80 } + PathQuad { x: 160; y: 30; controlX: 200; controlY: 80 } + } + + ShapePath { + strokeWidth: 10 + fillColor: "transparent" + strokeColor: "blue" + startX: 40; startY: 30 + PathCubic { x: 50; y: 80; control1X: 0; control1Y: 80; control2X: 100; control2Y: 100 } + } + + ShapePath { + fillGradient: LinearGradient { + y2: 150 + GradientStop { position: 0; color: "yellow" } + GradientStop { position: 1; color: "green" } + } + + startX: 10; startY: 100 + PathArc { + relativeX: 50; y: 100 + radiusX: 25; radiusY: 25 + } + PathArc { + relativeX: 50; y: 100 + radiusX: 25; radiusY: 35 + } + PathArc { + relativeX: 50; y: 100 + radiusX: 25; radiusY: 60 + } + PathArc { + relativeX: 50; y: 100 + radiusX: 50; radiusY: 120 + } + } + } +} diff --git a/tests/auto/quick/qquickshape/data/pathitem5.png b/tests/auto/quick/qquickshape/data/pathitem5.png Binary files differnew file mode 100644 index 0000000000..cb5cfd25dc --- /dev/null +++ b/tests/auto/quick/qquickshape/data/pathitem5.png diff --git a/tests/auto/quick/qquickshape/data/pathitem5.qml b/tests/auto/quick/qquickshape/data/pathitem5.qml new file mode 100644 index 0000000000..1bd465d5c0 --- /dev/null +++ b/tests/auto/quick/qquickshape/data/pathitem5.qml @@ -0,0 +1,37 @@ +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: RadialGradient { + centerX: 100; centerY: 100; centerRadius: 100 + focalX: 100; focalY: 100; focalRadius: 10 + GradientStop { position: 0; color: "#ffffff" } + GradientStop { position: 0.11; color: "#f9ffa0" } + GradientStop { position: 0.13; color: "#f9ff99" } + GradientStop { position: 0.14; color: "#f3ff86" } + GradientStop { position: 0.49; color: "#93b353" } + GradientStop { position: 0.87; color: "#264619" } + GradientStop { position: 0.96; color: "#0c1306" } + GradientStop { position: 1; color: "#000000" } + } + 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 } + } + } +} 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 } + } + } +} |