diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-05-31 12:42:09 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-06-02 10:16:52 +0000 |
commit | 961da5273e17655e73ec0975c6de446b88d7f5ca (patch) | |
tree | 6ef897a1149fc69d0905d7233106232208e07b2d /tests/auto/quick/qquickshape/data | |
parent | dece229a7c2284598c36fb668de766309a6893cf (diff) |
Rename to Shape/ShapePath and remove public JS API
Change-Id: I299354da0632fb0b8487cfb13748ed58b97d75fd
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
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 | 35 | ||||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem4.png | bin | 0 -> 5713 bytes | |||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem4.qml | 62 |
6 files changed, 109 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..12bfa1bb5f --- /dev/null +++ b/tests/auto/quick/qquickshape/data/pathitem3.qml @@ -0,0 +1,35 @@ +import QtQuick 2.9 +import tst_qquickpathitem 1.0 + +Item { + width: 200 + height: 150 + + Shape { + enableVendorExtensions: false + objectName: "pathItem" + anchors.fill: parent + + ShapePath { + strokeWidth: 4 + strokeColor: "red" + fillGradient: ShapeLinearGradient { + x1: 20; y1: 20 + x2: 180; y2: 130 + ShapeGradientStop { position: 0; color: "blue" } + ShapeGradientStop { position: 0.2; color: "green" } + ShapeGradientStop { position: 0.4; color: "red" } + ShapeGradientStop { position: 0.6; color: "yellow" } + ShapeGradientStop { position: 1; color: "cyan" } + } + strokeStyle: ShapePath.DashLine + dashPattern: [ 1, 4 ] + Path { + 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..7d9ed4b84e --- /dev/null +++ b/tests/auto/quick/qquickshape/data/pathitem4.qml @@ -0,0 +1,62 @@ +import QtQuick 2.9 +import tst_qquickpathitem 1.0 + +Item { + width: 200 + height: 150 + + Shape { + enableVendorExtensions: false + objectName: "pathItem" + anchors.fill: parent + + ShapePath { + strokeColor: "red" + fillColor: "green" + Path { + 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" + Path { + startX: 40; startY: 30 + PathCubic { x: 50; y: 80; control1X: 0; control1Y: 80; control2X: 100; control2Y: 100 } + } + } + + ShapePath { + fillGradient: ShapeLinearGradient { + y2: 150 + ShapeGradientStop { position: 0; color: "yellow" } + ShapeGradientStop { position: 1; color: "green" } + } + + Path { + 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 + } + } + } + } +} |