From 961da5273e17655e73ec0975c6de446b88d7f5ca Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 31 May 2017 12:42:09 +0200 Subject: Rename to Shape/ShapePath and remove public JS API Change-Id: I299354da0632fb0b8487cfb13748ed58b97d75fd Reviewed-by: Andy Nichols --- tests/auto/quick/qquickshape/data/pathitem1.qml | 5 ++ tests/auto/quick/qquickshape/data/pathitem2.qml | 7 +++ tests/auto/quick/qquickshape/data/pathitem3.png | Bin 0 -> 5214 bytes tests/auto/quick/qquickshape/data/pathitem3.qml | 35 +++++++++++++ tests/auto/quick/qquickshape/data/pathitem4.png | Bin 0 -> 5713 bytes tests/auto/quick/qquickshape/data/pathitem4.qml | 62 ++++++++++++++++++++++++ 6 files changed, 109 insertions(+) create mode 100644 tests/auto/quick/qquickshape/data/pathitem1.qml create mode 100644 tests/auto/quick/qquickshape/data/pathitem2.qml create mode 100644 tests/auto/quick/qquickshape/data/pathitem3.png create mode 100644 tests/auto/quick/qquickshape/data/pathitem3.qml create mode 100644 tests/auto/quick/qquickshape/data/pathitem4.png create mode 100644 tests/auto/quick/qquickshape/data/pathitem4.qml (limited to 'tests/auto/quick/qquickshape/data') 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 new file mode 100644 index 0000000000..a8b4483c96 Binary files /dev/null and b/tests/auto/quick/qquickshape/data/pathitem3.png differ 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 new file mode 100644 index 0000000000..3a988ba249 Binary files /dev/null and b/tests/auto/quick/qquickshape/data/pathitem4.png differ 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 + } + } + } + } +} -- cgit v1.2.3