diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-03-28 13:19:29 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-03-30 09:29:19 +0000 |
commit | 4cddb73882ed950f652fd1e079bc4cf8ccde93d5 (patch) | |
tree | 9861942e82d92641806b2fa296ed151dbe8a3691 /tests/auto/quick/qquickpathitem/data/pathitem4.qml | |
parent | 83fc08cc6faa5f52a010d7bd821c9606f13d5ae9 (diff) |
Add a PathItem autotest for the declarative API
Change-Id: I276c185c93122e5eb05ef6678ab62fa6928f2523
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'tests/auto/quick/qquickpathitem/data/pathitem4.qml')
-rw-r--r-- | tests/auto/quick/qquickpathitem/data/pathitem4.qml | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickpathitem/data/pathitem4.qml b/tests/auto/quick/qquickpathitem/data/pathitem4.qml new file mode 100644 index 0000000000..74f0ca7408 --- /dev/null +++ b/tests/auto/quick/qquickpathitem/data/pathitem4.qml @@ -0,0 +1,61 @@ +import QtQuick 2.9 + +Item { + width: 200 + height: 150 + + PathItem { + enableVendorExtensions: false + objectName: "pathItem" + anchors.fill: parent + + VisualPath { + 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 } + } + } + + VisualPath { + strokeWidth: 10 + fillColor: "transparent" + strokeColor: "blue" + Path { + startX: 40; startY: 30 + PathCubic { x: 50; y: 80; control1X: 0; control1Y: 80; control2X: 100; control2Y: 100 } + } + } + + VisualPath { + fillGradient: PathLinearGradient { + y2: 150 + PathGradientStop { position: 0; color: "yellow" } + PathGradientStop { 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 + } + } + } + } +} |