diff --git a/examples/TaoQuickShow/Contents.qrc b/examples/TaoQuickShow/Contents.qrc index feaa020..e45dbd1 100644 --- a/examples/TaoQuickShow/Contents.qrc +++ b/examples/TaoQuickShow/Contents.qrc @@ -61,5 +61,6 @@ Contents/ShapeGallery/ShapeCapStyles.qml Contents/ShapeGallery/ShapeJoinStyles.qml Contents/ShapeGallery/ShapeCubicBezier.qml + Contents/ShapeGallery/ShapeEllipticalArc.qml diff --git a/examples/TaoQuickShow/Contents/General/Shapes.qml b/examples/TaoQuickShow/Contents/General/Shapes.qml index 2a84e76..aef254b 100644 --- a/examples/TaoQuickShow/Contents/General/Shapes.qml +++ b/examples/TaoQuickShow/Contents/General/Shapes.qml @@ -44,6 +44,10 @@ Rectangle { name: "Cap Styles" shapeUrl: "../ShapeGallery/ShapeCapStyles.qml" } + ListElement { + name: "Elliptical Arc" + shapeUrl: "../ShapeGallery/ShapeEllipticalArc.qml" + } } property int gridSpacing: 10 diff --git a/examples/TaoQuickShow/Contents/ShapeGallery/ShapeEllipticalArc.qml b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeEllipticalArc.qml new file mode 100644 index 0000000..46b33e2 --- /dev/null +++ b/examples/TaoQuickShow/Contents/ShapeGallery/ShapeEllipticalArc.qml @@ -0,0 +1,59 @@ +import QtQuick 2.12 +import QtQuick.Shapes 1.12 + + +Rectangle { + color: "lightGray" + Shape { + id: shape + width: 220 + height: 200 + anchors.centerIn: parent + + ShapePath { + startX: 0; startY: 100 + fillColor: "white" + strokeColor: "black" + PathArc { + relativeX: 50; relativeY: 0 // === x:50; y:100 + radiusX: 25; radiusY: 25 + } + PathArc { + relativeX: 50; relativeY: 0 + radiusX: 25; radiusY: 35 + } + PathArc { + x: 150; y: 100 // === relativeX: 50; y: 100 + radiusX: 25; radiusY: 60 + } + PathArc { + relativeX: 50; y: 100 + radiusX: 25; radiusY: 25 + } + } + } + + Shape { + width: 220 + height: 100 + + anchors.left: parent.left + anchors.bottom: parent.bottom + anchors.bottomMargin: 10 + + scale: 0.5 + + ShapePath { + fillColor: "white" + strokeColor: "black" + strokeWidth: 10 + + // Defines an arc with the given radii and center + PathAngleArc { + centerX: 110; centerY: 95 + radiusX: 45; radiusY: 45 + sweepAngle:360 + } + } + } +}