Debian Codegraph @

tests/manual/scalablepath/ShapeTestScale.qml

raw
1 /****************************************************************************
2 **
3 ** Copyright (C) 2019 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the test suite of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:GPL-EXCEPT$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
21 ** included in the packaging of this file. Please review the following
22 ** information to ensure the GNU General Public License requirements will
23 ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
24 **
25 ** $QT_END_LICENSE$
26 **
27 ****************************************************************************/
28
29 import QtQuick 2.14
30 import QtQuick.Shapes 1.14
31
32 Rectangle {
33 id: i
34 width: parent.width * 0.5
35 height: parent.height * 0.5
36 anchors.centerIn: parent
37 color: "transparent"
38 border.color: "red"
39
40 Shape {
41 id: pathLineMove
42 vendorExtensionsEnabled: false
43 anchors {
44 left: parent.left
45 top: parent.top
46 bottom: parent.verticalCenter
47 right: parent.horizontalCenter
48 }
49
50 visible: true
51
52 ShapePath {
53 id: c_sp1
54 strokeWidth: -1
55 fillColor: Qt.rgba(1,0,1,1.0)
56 scale: Qt.size(pathLineMove.width - 1, pathLineMove.height - 1)
57
58 startX: 0.5;
59 startY: 1
60
61 PathLine {
62 x: 0
63 y: 1
64 }
65 PathLine {
66 x: 0.5
67 y: 0
68 }
69 PathLine {
70 x: 1
71 y: 1
72 }
73 PathLine {
74 x: c_sp1.startX
75 y: c_sp1.startY
76 }
77
78 // Inner shape
79 PathMove {
80 x: 0.5
81 y: 0.25
82 }
83 PathLine {
84 x: 0.8
85 y: 0.8
86 }
87 PathLine {
88 x: 0.2
89 y: 0.8
90 }
91 PathLine {
92 x: 0.5
93 y: 0.25
94 }
95 }
96 }
97 Shape {
98 id: pathCurveArcQuad
99 vendorExtensionsEnabled: false
100 anchors {
101 left: parent.horizontalCenter
102 top: parent.top
103 bottom: parent.verticalCenter
104 right: parent.right
105 }
106
107 visible: true
108
109 ShapePath {
110 strokeWidth: 1
111 fillColor: "transparent"
112 strokeColor: "goldenrod"
113 scale: Qt.size(pathCurveArcQuad.width - 1, pathCurveArcQuad.height - 1)
114
115 startX: 0/400; startY: 100/400
116
117 PathCurve { x: 75/400; y: 75/400 }
118 PathCurve { x: 200/400; y: 150/400 }
119 PathCurve { x: 325/400; y: 25/400 }
120 PathCurve { x: 400/400; y: 100/400 }
121 PathMove { x: 0.5; y: 0 }
122 PathArc {
123 x: 0; y: 100 / 200
124 radiusX: 100 / 200; radiusY: 100 / 200
125 useLargeArc: true
126 }
127 PathMove { x: 0; y: 0.5 }
128 PathQuad { x: 1; y: 0.5; controlX: 0.5; controlY: 1 }
129 }
130 }
131
132
133 Shape {
134 id: pathCubicAngleArc
135 vendorExtensionsEnabled: false
136 anchors {
137 left: parent.left
138 top: parent.verticalCenter
139 bottom: parent.bottom
140 right: parent.horizontalCenter
141 }
142
143 visible: true
144
145 ShapePath {
146 strokeWidth: 1
147 fillColor: "transparent"
148 strokeColor: "deepskyblue"
149 scale: Qt.size(pathCubicAngleArc.width - 1, pathCubicAngleArc.height - 1)
150
151 startX: 20/200; startY: 0
152
153 PathCubic {
154 x: 180/200; y: 0
155 control1X: -10/200; control1Y: 90/200
156 control2X: 210/200; control2Y: 90/200
157 }
158
159 PathAngleArc {
160 centerX: 0.5; centerY: 0.5
161 radiusX: 0.45; radiusY: 0.45
162 startAngle: -180
163 sweepAngle: 234
164 moveToStart: true
165 }
166 }
167 }
168 Shape {
169 id: pathSvg
170 vendorExtensionsEnabled: false
171 anchors {
172 left: parent.horizontalCenter
173 top: parent.verticalCenter
174 bottom: parent.bottom
175 right: parent.right
176 }
177
178 visible: true
179
180 ShapePath {
181 strokeWidth: 5
182 fillColor: "transparent"
183 strokeColor: "coral"
184 scale: Qt.size((pathSvg.width - 1), (pathSvg.height - 1))
185 startX: .25; startY: .25
186 PathSvg { path: "L .75 .25 L .5 .75 z" }
187 }
188
189 ShapePath {
190 strokeWidth: 1
191 fillColor: "transparent"
192 strokeColor: "black"
193 scale: Qt.size((pathSvg.width - 1) / 200, (pathSvg.height - 1) / 200)
194 startX: 50; startY: 50
195 PathSvg { path: "L 150 50 L 100 150 z" }
196 }
197
198 ShapePath {
199 strokeColor: "red"
200 strokeWidth: 4
201 fillColor: "transparent"
202 scale: Qt.size((pathSvg.width - 1) / 500, (pathSvg.height - 1) / 500)
203 PathSvg {
204 path: "m 325.03711,0.5
205 c -26.61408,6.4494547 -49.95197,2.1018066 -76.21132,1.0771669
206 -22.26577,7.6817151 -47.96405,9.3627181 -65.67832,25.8497861
207 -15.74718,12.80008 -41.1564,19.605644 -45.74903,40.600391
208 -12.46933,17.76181 -25.36105,35.720146 -29.20117,57.999996
209 -18.709864,3.10961 -16.347355,30.83801 -22.385143,46.675
210 -6.848711,11.2677 11.07278,24.69174 -8.514666,27.97383
211 -10.266901,5.61543 -12.859313,28.96588 -13.732346,5.78143
212 0.940083,-11.53398 -13.486195,-38.30626 -16.81701,-34.20231
213 14.608079,7.8234 21.299281,50.52979 11.380052,48.14418
214 -3.406456,-15.12428 -26.181106,-38.29457 -31.849471,-35.62945
215 16.851912,6.41472 35.569884,31.75215 28.172486,47.93115
216 -7.906485,-15.42757 -37.758959,-35.53783 -44.275447,-31.28685
217 18.975831,1.7428 37.986009,20.68109 42.87115,37.14427 C
218 42.279655,225.774 9.879724,213.57795 4.7080253,219.04989
219 20.780803,212.57418 55.055919,239.88547 49.602579,241.25683
220 38.186641,230.40078 6.6930104,222.77983 2.5752529,228.41774 c
221 13.6045481,-8.33065 49.4437901,14.89041 43.5525671,14.2358
222 -9.759981,-7.96123 -43.5842921,7.36937 -17.554974,-1.20248
223 9.464499,-3.73452 40.555672,12.80659 16.398749,5.14121
224 -9.1987,-7.28225 -39.0013156,3.37352 -14.121965,-2.12828
225 13.244874,-0.0206 35.758428,14.62706 10.562447,6.42228
226 -10.780465,-8.4873 -47.8282254,11.10651 -21.027329,-0.003
227 11.640859,-4.82877 52.615601,10.74471 24.234828,8.2659
228 -10.695834,-7.03902 -42.9384162,8.93905 -34.227854,5.58373
229 9.077539,-8.56443 49.068801,-5.28097 43.06838,0.45546
230 -10.900893,-0.7118 -27.449619,17.27258 -10.00187,3.46526
231 15.705191,-9.18198 18.344231,9.31645 1.10807,8.73907
232 -9.908444,1.77856 -21.108189,20.66671 -7.974821,4.92019
233 15.750746,-14.10374 34.01348,2.07267 9.796961,8.69337
234 -8.17128,5.49929 -12.642664,19.13654 -3.994573,4.19708
235 9.044753,-8.7077 23.850399,-13.64552 21.404959,4.02329
236 12.509737,17.12562 51.158782,11.0442 45.106112,43.34009
237 -0.65006,10.05318 -3.79228,13.95389 1.62128,14.30064
238 -4.30913,8.82737 -14.652714,37.9591 2.92144,17.46024
239 7.37972,-3.68333 -7.62399,16.24161 -7.98007,23.83761
240 -9.336865,18.77418 19.74873,-18.55943 6.62229,5.46195
241 5.46464,-3.7389 36.23886,-19.41901 14.78167,0.58987
242 -8.59505,4.55644 29.29441,-2.99423 8.95489,6.47134 -9.22562,5.54437
243 -24.09765,26.79976 -11.73274,22.20385 -0.81685,5.4936
244 -1.58629,21.47626 2.34158,9.14886 1.61237,14.67029
245 -2.38384,25.22225 12.26908,15.1741 -4.40761,8.01039
246 -8.23679,36.91214 5.12235,17.92578 1.53454,2.99551 9.37569,3.1726
247 7.15304,14.93579 3.51234,-11.31873 18.4607,-29.83809
248 12.36869,-6.48005 -0.22629,16.26174 5.44303,-7.24791
249 6.56926,10.49819 12.45412,28.9931 3.40908,-41.89883
250 17.52051,-9.19238 3.23093,11.1924 6.53006,29.46941 7.55984,5.1249
251 15.37236,-19.52583 4.09776,20.07416 12.64063,1.48215
252 18.11247,-24.55068 -8.92586,38.39355 6.73828,6.62225
253 4.55353,-6.91007 15.35028,-38.88977 12.55806,-13.78666
254 1.05309,27.02664 11.54743,-24.40259 12.40657,6.86306
255 -1.72561,13.28253 11.85393,-24.15909 13.85568,-1.38002
256 3.12455,8.33539 8.76536,26.46432 8.73882,5.09231 3.57025,-10.37352
257 -16.025,-37.75672 0.20707,-22.5788 -1.2458,-14.17213
258 -2.38918,-16.90145 10.85489,-6.71468 -16.57629,-17.22152
259 0.19706,-26.08949 5.7751,-19.14889 -14.91681,-16.1674
260 19.74174,7.19334 2.31875,-9.86869 -4.32508,-15.23278
261 27.25228,29.12341 20.27514,18.81172 -11.97527,-18.92603
262 -17.96305,-45.80333 11.70099,-51.52566 17.19069,-9.57351
263 31.17452,21.93154 38.50541,1.56304 16.26048,-4.6633
264 22.3749,38.26516 24.86349,9.11316 5.94153,-9.9731 30.14313,6.97379
265 36.34294,4.75012 7.07435,18.27732 8.06778,14.78971 11.04264,3.86016
266 2.73754,-15.85945 28.7269,10.06391 28.09146,25.96561 3.00672,2.4754
267 6.55025,-22.10264 11.23552,-14.43872 2.84155,-11.4823
268 -3.28976,-27.88574 4.24895,-25.5189 -0.61494,-11.53957
269 22.83611,0.11011 10.64648,-15.28756 -6.5587,-21.38598
270 9.32959,-3.0159 13.5107,-4.69375 -1.38592,-16.74533
271 -8.66673,-31.83316 -1.90087,-41.0875 2.39623,-15.14303
272 -12.50533,-44.45478 -4.70573,-48.49375 15.08472,3.42779
273 -20.39159,-42.17451 -1.69776,-40.85728 24.07272,21.63552
274 -3.65989,-30.10299 2.27233,-33.17152 16.90643,17.53071
275 -12.7383,-38.42821 6.79531,-21.57013 -4.50946,-21.08135
276 -2.53357,-37.43561 -15.5535,-55.59527 -11.0035,-12.40086
277 -1.87775,-7.12745 1.34831,-8.11755 C 468.27562,118.9774
278 451.40746,102.656 430.98897,92.119168 439.06192,78.203836
279 455.88012,60.123881 457.38638,40.337815 463.2373,23.183067
280 450.82861,4.7342783 435.04883,22.626367 409.5188,28.206712
281 386.3569,24.131269 365.63904,8.0954152 352.788,2.8857182
282 338.88892,0.40735091 325.03711,0.5 Z m -219.0625,357.04297
283 -0.97656,0.88476 z"
284 }
285 }
286 }
287 }