1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Shapes
ControlledShape {
delegate: [
PathMove { x: p0.cx; y: p0.cy },
PathQuad { x: p1.cx; y: p1.cy; controlX: c0.cx; controlY: c0.cy },
PathQuad { x: p2.cx; y: p2.cy; controlX: c1.cx; controlY: c1.cy },
PathQuad { x: p3.cx; y: p3.cy; controlX: c2.cx; controlY: c2.cy },
PathQuad { x: p0.cx; y: p0.cy; controlX: c3.cx; controlY: c3.cy },
PathMove { x: p4.cx; y: p4.cy; },
PathLine { x: p5.cx; y: p5.cy; },
PathLine { x: p6.cx; y: p6.cy; },
PathLine { x: p7.cx; y: p7.cy; },
PathLine { x: p4.cx; y: p4.cy; }
]
ControlPoint {
id: p0
cx: 200
cy: 200
}
ControlPoint {
id: c0
color: "blue"
cx: 600
cy: 1000
}
ControlPoint {
id: p1
cx: 1000
cy: 200
}
ControlPoint {
id: c1
color: "blue"
cx: -100
cy: 200
}
ControlPoint {
id: p2
color: "red"
cx: 200
cy: 1000
}
ControlPoint {
id: c2
color: "blue"
cx: -100
cy: 1000
}
ControlPoint {
id: p3
color: "red"
cx: -100
cy: 500
}
ControlPoint {
id: c3
color: "blue"
cx: -300
cy: 200
}
ControlPoint {
id: p4
color: "green"
cx: 2000
cy: 200
}
ControlPoint {
id: p5
color: "green"
cx: 2500
cy: 700
}
ControlPoint {
id: p6
color: "green"
cx: 2000
cy: 700
}
ControlPoint {
id: p7
color: "green"
cx: 2500
cy: 200
}
Text {
anchors.centerIn: p0
text: "p0"
}
Text {
anchors.centerIn: p1
text: "p1"
}
Text {
anchors.centerIn: p2
text: "p2"
}
Text {
anchors.centerIn: p3
text: "p3"
}
Text {
anchors.centerIn: c0
text: "c0"
}
Text {
anchors.centerIn: c1
text: "c1"
}
Text {
anchors.centerIn: c2
text: "c2"
}
Text {
anchors.centerIn: c3
text: "c3"
}
Text {
anchors.centerIn: p4
text: "p4"
}
Text {
anchors.centerIn: p5
text: "p5"
}
Text {
anchors.centerIn: p6
text: "p6"
}
Text {
anchors.centerIn: p7
text: "p7"
}
}
|