1 | /**************************************************************************** |
2 | ** |
3 | ** Copyright (C) 2016 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 | #include "paths.h" |
29 | |
30 | QPainterPath Paths::rect() |
31 | { |
32 | QPainterPath path; |
33 | |
34 | path.moveTo(x: 45.885571, y: 62.857143); |
35 | path.lineTo(x: 154.11442, y: 62.857143); |
36 | path.cubicTo(ctrlPt1x: 162.1236, ctrlPt1y: 62.857143, |
37 | ctrlPt2x: 168.57142, ctrlPt2y: 70.260744, |
38 | endPtx: 168.57142, endPty: 79.457144); |
39 | path.lineTo(x: 168.57142, y: 123.4); |
40 | path.cubicTo(ctrlPt1x: 168.57142, ctrlPt1y: 132.5964, |
41 | ctrlPt2x: 162.1236, ctrlPt2y: 140, |
42 | endPtx: 154.11442, endPty: 140); |
43 | path.lineTo(x: 45.885571, y: 140); |
44 | path.cubicTo(ctrlPt1x: 37.876394, ctrlPt1y: 140, |
45 | ctrlPt2x: 31.428572, ctrlPt2y: 132.5964, |
46 | endPtx: 31.428572, endPty: 123.4); |
47 | path.lineTo(x: 31.428572, y: 79.457144); |
48 | path.cubicTo(ctrlPt1x: 31.428572,ctrlPt1y: 70.260744, |
49 | ctrlPt2x: 37.876394,ctrlPt2y: 62.857143, |
50 | endPtx: 45.885571,endPty: 62.857143); |
51 | path.closeSubpath(); |
52 | return path; |
53 | } |
54 | |
55 | QPainterPath Paths::rect6() |
56 | { |
57 | QPainterPath path; |
58 | |
59 | path.moveTo(x: 45.885571, y: 62.857143); |
60 | path.lineTo(x: 154.11442, y: 62.857143); |
61 | path.cubicTo(ctrlPt1x: 162.1236, ctrlPt1y: 62.857143, |
62 | ctrlPt2x: 168.57142, ctrlPt2y: 70.260744, |
63 | endPtx: 168.57142, endPty: 79.457144); |
64 | path.lineTo(x: 168.57142, y: 123.4); |
65 | path.cubicTo(ctrlPt1x: 168.57142, ctrlPt1y: 132.5964, |
66 | ctrlPt2x: 162.1236, ctrlPt2y: 140, |
67 | endPtx: 154.11442, endPty: 140); |
68 | path.lineTo(x: 45.885571, y: 140); |
69 | path.closeSubpath(); |
70 | return path; |
71 | } |
72 | |
73 | |
74 | QPainterPath Paths::heart() |
75 | { |
76 | QPainterPath path; |
77 | path.moveTo(x: 263.41570, y: 235.14588); |
78 | path.cubicTo(ctrlPt1x: 197.17570,ctrlPt1y: 235.14588, |
79 | ctrlPt2x: 143.41575,ctrlPt2y: 288.90587, |
80 | endPtx: 143.41575,endPty: 355.14588); |
81 | path.cubicTo(ctrlPt1x: 143.41575, ctrlPt1y: 489.90139, |
82 | ctrlPt2x: 279.34890, ctrlPt2y: 525.23318, |
83 | endPtx: 371.97820, endPty: 658.45392); |
84 | path.cubicTo(ctrlPt1x: 459.55244,ctrlPt1y: 526.05056, |
85 | ctrlPt2x: 600.54070,ctrlPt2y: 485.59932, |
86 | endPtx: 600.54070,endPty: 355.14588); |
87 | path.cubicTo(ctrlPt1x: 600.54070,ctrlPt1y: 288.90588, ctrlPt2x: 546.78080,ctrlPt2y: 235.14587, endPtx: 480.54070,endPty: 235.14588); |
88 | path.cubicTo(ctrlPt1x: 432.49280,ctrlPt1y: 235.14588, ctrlPt2x: 391.13910,ctrlPt2y: 263.51631, endPtx: 371.97820,endPty: 304.33338); |
89 | path.cubicTo(ctrlPt1x: 352.81740,ctrlPt1y: 263.51630, ctrlPt2x: 311.46370,ctrlPt2y: 235.14587, endPtx: 263.41570,endPty: 235.14588); |
90 | path.closeSubpath(); |
91 | return path; |
92 | } |
93 | |
94 | |
95 | QPainterPath Paths::body() |
96 | { |
97 | QPainterPath path; |
98 | path.moveTo(x: 62.500000,y: 15.531250); |
99 | path.cubicTo(ctrlPt1x: 48.633197,ctrlPt1y: 15.531250, ctrlPt2x: 37.374999,ctrlPt2y: 26.789445, endPtx: 37.375000,endPty: 40.656250); |
100 | path.cubicTo(ctrlPt1x: 37.375000,ctrlPt1y: 54.523053, ctrlPt2x: 48.633195,ctrlPt2y: 65.781252, endPtx: 62.500000,endPty: 65.781250); |
101 | path.cubicTo(ctrlPt1x: 76.366803,ctrlPt1y: 65.781250, ctrlPt2x: 87.624998,ctrlPt2y: 54.523052, endPtx: 87.625000,endPty: 40.656250); |
102 | path.cubicTo(ctrlPt1x: 87.625000,ctrlPt1y: 26.789447, ctrlPt2x: 76.366802,ctrlPt2y: 15.531250, endPtx: 62.500000,endPty: 15.531250); |
103 | path.closeSubpath(); |
104 | path.moveTo(x: 54.437500,y: 65.812500); |
105 | path.cubicTo(ctrlPt1x: 35.184750,ctrlPt1y: 65.812499, ctrlPt2x: 19.687500,ctrlPt2y: 81.341002, endPtx: 19.687500,endPty: 100.59375); |
106 | path.lineTo(x: 19.687500,y: 155.68750); |
107 | path.cubicTo(ctrlPt1x: 19.687501,ctrlPt1y: 167.50351, ctrlPt2x: 25.539122,ctrlPt2y: 177.88308, endPtx: 34.500000,endPty: 184.15625); |
108 | path.lineTo(x: 34.500000,y: 254.03125); |
109 | path.cubicTo(ctrlPt1x: 34.499999,ctrlPt1y: 257.03306, ctrlPt2x: 46.990615,ctrlPt2y: 259.43748, endPtx: 62.500000,endPty: 259.43750); |
110 | path.cubicTo(ctrlPt1x: 78.009381,ctrlPt1y: 259.43751, ctrlPt2x: 90.468750,ctrlPt2y: 257.03307, endPtx: 90.468750,endPty: 254.03125); |
111 | path.lineTo(x: 90.468750,y: 184.15625); |
112 | path.cubicTo(ctrlPt1x: 99.429633,ctrlPt1y: 177.88307, ctrlPt2x: 105.28125,ctrlPt2y: 167.50352, endPtx: 105.28125,endPty: 155.68750); |
113 | path.lineTo(x: 105.28125,y: 100.59375); |
114 | path.cubicTo(ctrlPt1x: 105.28125,ctrlPt1y: 81.341000, ctrlPt2x: 89.784000,ctrlPt2y: 65.812500, endPtx: 70.531250,endPty: 65.812500); |
115 | path.lineTo(x: 54.437500,y: 65.812500); |
116 | path.closeSubpath(); |
117 | |
118 | return path; |
119 | } |
120 | |
121 | |
122 | QPainterPath Paths::mailbox() |
123 | { |
124 | QPainterPath path; |
125 | path.moveTo(x: 355.22951,y: 136.82424); |
126 | path.lineTo(x: 332.03629,y: 112.56585); |
127 | path.lineTo(x: 325.71086,y: 57.501867); |
128 | path.cubicTo(ctrlPt1x: 325.71086,ctrlPt1y: 57.501867, ctrlPt2x: 410.12308,ctrlPt2y: 19.428758, endPtx: 427.45202,endPty: 29.094560); |
129 | path.cubicTo(ctrlPt1x: 444.78096,ctrlPt1y: 38.760366, ctrlPt2x: 443.62570,ctrlPt2y: 54.289660, endPtx: 443.62570,endPty: 54.289660); |
130 | path.lineTo(x: 443.62570,y: 100.11509); |
131 | path.lineTo(x: 355.22951,y: 136.82424); |
132 | path.closeSubpath(); |
133 | |
134 | return path; |
135 | } |
136 | |
137 | |
138 | QPainterPath Paths::deer() |
139 | { |
140 | QPainterPath path; |
141 | |
142 | path.moveTo(x: 39.88,y: 31.658); |
143 | path.cubicTo(ctrlPt1x: 35.632,ctrlPt1y: 31.658, ctrlPt2x: 31.398,ctrlPt2y: 31.004, endPtx: 27.871,endPty: 32.82); |
144 | path.cubicTo(ctrlPt1x: 25.015,ctrlPt1y: 34.29, ctrlPt2x: 19.608,ctrlPt2y: 34.158, endPtx: 16.297,endPty: 34.158); |
145 | path.cubicTo(ctrlPt1x: 14.722,ctrlPt1y: 34.158, ctrlPt2x: 17.755,ctrlPt2y: 37.718, endPtx: 17.709,endPty: 38.922); |
146 | path.cubicTo(ctrlPt1x: 17.578,ctrlPt1y: 42.396, ctrlPt2x: 24.612,ctrlPt2y: 43.15, endPtx: 26.755,endPty: 44.058); |
147 | path.cubicTo(ctrlPt1x: 30.062,ctrlPt1y: 45.46, ctrlPt2x: 28.682,ctrlPt2y: 47.701, endPtx: 28.963,endPty: 50.574); |
148 | path.cubicTo(ctrlPt1x: 29.715,ctrlPt1y: 58.243, ctrlPt2x: 26.887,ctrlPt2y: 63.745, endPtx: 24.182,endPty: 70.589); |
149 | path.cubicTo(ctrlPt1x: 23.365,ctrlPt1y: 72.657, ctrlPt2x: 21.772,ctrlPt2y: 75.56, endPtx: 21.972,endPty: 77.866); |
150 | path.cubicTo(ctrlPt1x: 22.333,ctrlPt1y: 82.029, ctrlPt2x: 15.803,ctrlPt2y: 77.207, endPtx: 13.894,endPty: 76.535); |
151 | path.cubicTo(ctrlPt1x: 10.977,ctrlPt1y: 75.508, ctrlPt2x: 5.507,ctrlPt2y: 74.071, endPtx: 2.424,endPty: 75.331); |
152 | path.cubicTo(ctrlPt1x: -1.532,ctrlPt1y: 76.947, ctrlPt2x: 0.076,ctrlPt2y: 80.491, endPtx: 2.169,endPty: 82.806); |
153 | path.cubicTo(ctrlPt1x: 6.17,ctrlPt1y: 87.234, ctrlPt2x: 2.703,ctrlPt2y: 90.713, endPtx: 3.895,endPty: 95.363); |
154 | path.cubicTo(ctrlPt1x: 4.321,ctrlPt1y: 97.026, ctrlPt2x: 11.682,ctrlPt2y: 104.683, endPtx: 12.858,endPty: 103.668); |
155 | path.cubicTo(ctrlPt1x: 16.706,ctrlPt1y: 100.347, ctrlPt2x: 11.464,ctrlPt2y: 98.692, endPtx: 10.105,endPty: 96.164); |
156 | path.cubicTo(ctrlPt1x: 9.487,ctrlPt1y: 95.015, ctrlPt2x: 8.616,ctrlPt2y: 83.742, endPtx: 8.866,endPty: 83.759); |
157 | path.cubicTo(ctrlPt1x: 10.018,ctrlPt1y: 83.837, ctrlPt2x: 12.591,ctrlPt2y: 85.867, endPtx: 13.671,endPty: 86.392); |
158 | path.cubicTo(ctrlPt1x: 16.889,ctrlPt1y: 87.954, ctrlPt2x: 20.066,ctrlPt2y: 89.63, endPtx: 22.963,endPty: 91.741); |
159 | path.cubicTo(ctrlPt1x: 29.156,ctrlPt1y: 94.47, ctrlPt2x: 35.543,ctrlPt2y: 96.965, endPtx: 42.102,endPty: 98.676); |
160 | path.cubicTo(ctrlPt1x: 51.085,ctrlPt1y: 101.02, ctrlPt2x: 59.407,ctrlPt2y: 102.003, endPtx: 68.009,endPty: 106.005); |
161 | path.cubicTo(ctrlPt1x: 72.92,ctrlPt1y: 108.289, ctrlPt2x: 72.05,ctrlPt2y: 113.282, endPtx: 75.744,endPty: 117.004); |
162 | path.cubicTo(ctrlPt1x: 79.422,ctrlPt1y: 120.709, ctrlPt2x: 84.733,ctrlPt2y: 123.053, endPtx: 88.978,endPty: 126.053); |
163 | path.cubicTo(ctrlPt1x: 92.402,ctrlPt1y: 128.473, ctrlPt2x: 95.422,ctrlPt2y: 132.308, endPtx: 97.334,endPty: 135.998); |
164 | path.cubicTo(ctrlPt1x: 99.551,ctrlPt1y: 140.279, ctrlPt2x: 99.071,ctrlPt2y: 146.004, endPtx: 99.838,endPty: 150.674); |
165 | path.cubicTo(ctrlPt1x: 100.369,ctrlPt1y: 153.91, ctrlPt2x: 104.378,ctrlPt2y: 156.321, endPtx: 106.302,endPty: 158.859); |
166 | path.cubicTo(ctrlPt1x: 110.471,ctrlPt1y: 164.355, ctrlPt2x: 109.86,ctrlPt2y: 155.112, endPtx: 108.163,endPty: 154.412); |
167 | path.cubicTo(ctrlPt1x: 104.97,ctrlPt1y: 153.094, ctrlPt2x: 103.991,ctrlPt2y: 146.625, endPtx: 103.812,endPty: 143.439); |
168 | path.cubicTo(ctrlPt1x: 103.525,ctrlPt1y: 138.336, ctrlPt2x: 105.568,ctrlPt2y: 134.331, endPtx: 101.918,endPty: 130.346); |
169 | path.cubicTo(ctrlPt1x: 95.104,ctrlPt1y: 122.907, ctrlPt2x: 89.488,ctrlPt2y: 114.182, endPtx: 94.711,endPty: 103.742); |
170 | path.cubicTo(ctrlPt1x: 96.889,ctrlPt1y: 99.388, ctrlPt2x: 91.191,ctrlPt2y: 95.497, endPtx: 96.94,endPty: 94.368); |
171 | path.cubicTo(ctrlPt1x: 99.551,ctrlPt1y: 93.856, ctrlPt2x: 102.49,ctrlPt2y: 94.367, endPtx: 104.326,endPty: 92.034); |
172 | path.cubicTo(ctrlPt1x: 106.639,ctrlPt1y: 89.095, ctrlPt2x: 105.063,ctrlPt2y: 85.343, endPtx: 102.943,endPty: 82.798); |
173 | path.cubicTo(ctrlPt1x: 102.686,ctrlPt1y: 82.417, ctrlPt2x: 102.359,ctrlPt2y: 82.121, endPtx: 101.962,endPty: 81.909); |
174 | path.cubicTo(ctrlPt1x: 102.331,ctrlPt1y: 81.909, ctrlPt2x: 101.923,ctrlPt2y: 86.98, endPtx: 100.981,endPty: 87.628); |
175 | path.cubicTo(ctrlPt1x: 98.868,ctrlPt1y: 89.082, ctrlPt2x: 95.569,ctrlPt2y: 91.586, endPtx: 92.88,endPty: 91.672); |
176 | path.cubicTo(ctrlPt1x: 90.569,ctrlPt1y: 91.745, ctrlPt2x: 86.738,ctrlPt2y: 89.184, endPtx: 85.212,endPty: 87.658); |
177 | path.cubicTo(ctrlPt1x: 84.092,ctrlPt1y: 86.538, ctrlPt2x: 80.176,ctrlPt2y: 86.157, endPtx: 78.598,endPty: 85.83); |
178 | path.cubicTo(ctrlPt1x: 74.737,ctrlPt1y: 85.031, ctrlPt2x: 71.741,ctrlPt2y: 84.326, endPtx: 68.012,endPty: 82.806); |
179 | path.cubicTo(ctrlPt1x: 63.318,ctrlPt1y: 80.893, ctrlPt2x: 58.687,ctrlPt2y: 78.672, endPtx: 54.555,endPty: 75.71); |
180 | path.cubicTo(ctrlPt1x: 44.573,ctrlPt1y: 68.555, ctrlPt2x: 42.755,ctrlPt2y: 56.146, endPtx: 44.022,endPty: 44.495); |
181 | path.cubicTo(ctrlPt1x: 44.295,ctrlPt1y: 41.987, ctrlPt2x: 43.169,ctrlPt2y: 38.057, endPtx: 44.617,endPty: 35.915); |
182 | path.cubicTo(ctrlPt1x: 44.961,ctrlPt1y: 35.406, ctrlPt2x: 46.52,ctrlPt2y: 35.553, endPtx: 47.119,endPty: 35.024); |
183 | path.cubicTo(ctrlPt1x: 47.882,ctrlPt1y: 34.35, ctrlPt2x: 49.574,ctrlPt2y: 31.822, endPtx: 49.878,endPty: 30.792); |
184 | path.cubicTo(ctrlPt1x: 51.126,ctrlPt1y: 26.569, ctrlPt2x: 44.36,ctrlPt2y: 32.002, endPtx: 45.336,endPty: 31.938); |
185 | path.cubicTo(ctrlPt1x: 43.861,ctrlPt1y: 32.036, ctrlPt2x: 47.011,ctrlPt2y: 22.934, endPtx: 47.191,endPty: 22.574); |
186 | path.cubicTo(ctrlPt1x: 47.555,ctrlPt1y: 21.846, ctrlPt2x: 52.489,ctrlPt2y: 13.123, endPtx: 49.511,endPty: 13.222); |
187 | path.cubicTo(ctrlPt1x: 47.643,ctrlPt1y: 13.284, ctrlPt2x: 48.563,ctrlPt2y: 18.667, endPtx: 46.354,endPty: 18.227); |
188 | path.cubicTo(ctrlPt1x: 43.964,ctrlPt1y: 17.751, ctrlPt2x: 40.522,ctrlPt2y: 11.396, endPtx: 41.566,endPty: 9.011); |
189 | path.cubicTo(ctrlPt1x: 43.4,ctrlPt1y: 4.819, ctrlPt2x: 39.743,ctrlPt2y: 3.905, endPtx: 39.214,endPty: 7.564); |
190 | path.cubicTo(ctrlPt1x: 39.112,ctrlPt1y: 8.269, ctrlPt2x: 40.893,ctrlPt2y: 13.438, endPtx: 38.159,endPty: 12.665); |
191 | path.cubicTo(ctrlPt1x: 35.335,ctrlPt1y: 11.866, ctrlPt2x: 35.748,ctrlPt2y: -0.125, endPtx: 34.38,endPty: -8.0352391e-15); |
192 | path.cubicTo(ctrlPt1x: 31.991,ctrlPt1y: 0.219, ctrlPt2x: 34.074,ctrlPt2y: 10.836, endPtx: 33.361,endPty: 12.176); |
193 | path.cubicTo(ctrlPt1x: 33.144,ctrlPt1y: 12.584, ctrlPt2x: 29.68,ctrlPt2y: 8.66, endPtx: 29.459,endPty: 7.718); |
194 | path.cubicTo(ctrlPt1x: 28.48,ctrlPt1y: 3.558, ctrlPt2x: 28.031,ctrlPt2y: 5.106, endPtx: 26.87,endPty: 7.752); |
195 | path.cubicTo(ctrlPt1x: 25.333,ctrlPt1y: 11.254, ctrlPt2x: 37.159,ctrlPt2y: 17.423, endPtx: 39.292,endPty: 18.663); |
196 | path.cubicTo(ctrlPt1x: 40.993,ctrlPt1y: 19.651, ctrlPt2x: 42.39,ctrlPt2y: 20.504, endPtx: 42.973,endPty: 22.48); |
197 | path.cubicTo(ctrlPt1x: 43.482,ctrlPt1y: 24.205, ctrlPt2x: 44.098,ctrlPt2y: 26.568, endPtx: 42.926,endPty: 28.191); |
198 | path.cubicTo(ctrlPt1x: 42.092,ctrlPt1y: 29.346, ctrlPt2x: 39.88,ctrlPt2y: 29.982, endPtx: 39.88,endPty: 31.658); |
199 | return path; |
200 | } |
201 | |
202 | |
203 | QPainterPath Paths::fire() |
204 | { |
205 | QPainterPath path; |
206 | |
207 | path.moveTo(x: 362.83759,y: 116.70426); |
208 | path.cubicTo(ctrlPt1x: 342.56574,ctrlPt1y: 131.59686, ctrlPt2x: 300.71403,ctrlPt2y: 161.23127, endPtx: 311.38454,endPty: 218.12635); |
209 | path.cubicTo(ctrlPt1x: 322.05506,ctrlPt1y: 275.02144, ctrlPt2x: 358.53432,ctrlPt2y: 301.66527, endPtx: 328.90674,endPty: 328.73285); |
210 | path.cubicTo(ctrlPt1x: 299.27916,ctrlPt1y: 355.80044, ctrlPt2x: 251.48877,ctrlPt2y: 339.59410, endPtx: 255.46042,endPty: 288.61972); |
211 | path.cubicTo(ctrlPt1x: 258.22374,ctrlPt1y: 253.15368, ctrlPt2x: 278.34141,ctrlPt2y: 205.10942, endPtx: 278.34141,endPty: 205.10942); |
212 | path.cubicTo(ctrlPt1x: 278.34141,ctrlPt1y: 205.10942, ctrlPt2x: 234.02455,ctrlPt2y: 233.13427, endPtx: 219.68939,endPty: 254.01270); |
213 | path.cubicTo(ctrlPt1x: 205.35424,ctrlPt1y: 274.89113, ctrlPt2x: 189.71452,ctrlPt2y: 330.07842, endPtx: 208.58356,endPty: 373.33974); |
214 | path.cubicTo(ctrlPt1x: 227.45261,ctrlPt1y: 416.60109, ctrlPt2x: 316.46286,ctrlPt2y: 456.33444, endPtx: 351.12048,endPty: 514.32780); |
215 | path.cubicTo(ctrlPt1x: 374.10258,ctrlPt1y: 552.78425, ctrlPt2x: 355.05815,ctrlPt2y: 613.59741, endPtx: 310.80422,endPty: 636.59310); |
216 | path.cubicTo(ctrlPt1x: 256.63287,ctrlPt1y: 664.74219, ctrlPt2x: 299.16588,ctrlPt2y: 580.49238, endPtx: 285.22551,endPty: 523.86186); |
217 | path.cubicTo(ctrlPt1x: 273.46790,ctrlPt1y: 476.09839, ctrlPt2x: 265.70022,ctrlPt2y: 445.12001, endPtx: 188.03132,endPty: 432.51681); |
218 | path.cubicTo(ctrlPt1x: 233.72591,ctrlPt1y: 465.34901, ctrlPt2x: 242.16068,ctrlPt2y: 495.04075, endPtx: 241.45928,endPty: 524.11772); |
219 | path.cubicTo(ctrlPt1x: 240.78648,ctrlPt1y: 552.00862, ctrlPt2x: 214.39595,ctrlPt2y: 634.57293, endPtx: 177.39967,endPty: 596.79021); |
220 | path.cubicTo(ctrlPt1x: 140.72642,ctrlPt1y: 559.33737, ctrlPt2x: 214.27071,ctrlPt2y: 512.68654, endPtx: 170.92945,endPty: 471.62081); |
221 | path.cubicTo(ctrlPt1x: 174.73284,ctrlPt1y: 501.40284, ctrlPt2x: 145.30515,ctrlPt2y: 514.98828, endPtx: 131.55318,endPty: 544.54392); |
222 | path.cubicTo(ctrlPt1x: 118.22673,ctrlPt1y: 573.18509, ctrlPt2x: 123.55251,ctrlPt2y: 610.30651, endPtx: 139.07596,endPty: 645.41379); |
223 | path.cubicTo(ctrlPt1x: 181.14122,ctrlPt1y: 740.38745, ctrlPt2x: 266.95518,ctrlPt2y: 726.23964, endPtx: 208.75321,endPty: 797.88229); |
224 | path.cubicTo(ctrlPt1x: 164.01134,ctrlPt1y: 852.95649, ctrlPt2x: 162.90150,ctrlPt2y: 907.45084, endPtx: 205.60384,endPty: 970.81121); |
225 | path.cubicTo(ctrlPt1x: 240.06795,ctrlPt1y: 1021.9479, ctrlPt2x: 371.11663,ctrlPt2y: 1060.7652, endPtx: 432.20697,endPty: 960.93460); |
226 | path.cubicTo(ctrlPt1x: 501.87852,ctrlPt1y: 820.00694, ctrlPt2x: 357.14883,ctrlPt2y: 780.33174, endPtx: 386.29974,endPty: 732.84721); |
227 | path.cubicTo(ctrlPt1x: 405.70205,ctrlPt1y: 701.24238, ctrlPt2x: 472.56601,ctrlPt2y: 668.86516, endPtx: 501.09199,endPty: 644.21233); |
228 | path.cubicTo(ctrlPt1x: 564.18184,ctrlPt1y: 587.55421, ctrlPt2x: 561.84437,ctrlPt2y: 497.32621, endPtx: 522.74229,endPty: 471.25817); |
229 | path.cubicTo(ctrlPt1x: 530.19030,ctrlPt1y: 501.05022, ctrlPt2x: 514.99952,ctrlPt2y: 542.79339, endPtx: 483.67099,endPty: 551.29691); |
230 | path.cubicTo(ctrlPt1x: 423.41173,ctrlPt1y: 567.65308, ctrlPt2x: 458.18351,ctrlPt2y: 411.79373, endPtx: 564.02075,endPty: 393.61925); |
231 | path.cubicTo(ctrlPt1x: 530.91135,ctrlPt1y: 366.44998, ctrlPt2x: 501.31413,ctrlPt2y: 367.33484, endPtx: 454.91711,endPty: 379.11707); |
232 | path.cubicTo(ctrlPt1x: 397.61736,ctrlPt1y: 393.57908, ctrlPt2x: 407.64322,ctrlPt2y: 315.40944, endPtx: 494.34643,endPty: 262.67861); |
233 | path.cubicTo(ctrlPt1x: 549.19500,ctrlPt1y: 229.32101, ctrlPt2x: 499.11573,ctrlPt2y: 147.63302, endPtx: 491.66772,endPty: 136.46100); |
234 | path.cubicTo(ctrlPt1x: 485.38713,ctrlPt1y: 213.93294, ctrlPt2x: 435.43515,ctrlPt2y: 233.35601, endPtx: 409.98053,endPty: 235.72292); |
235 | path.cubicTo(ctrlPt1x: 375.27049,ctrlPt1y: 238.95043, ctrlPt2x: 377.84554,ctrlPt2y: 214.33812, endPtx: 396.75003,endPty: 178.92950); |
236 | path.cubicTo(ctrlPt1x: 416.21172,ctrlPt1y: 142.47722, ctrlPt2x: 448.15395,ctrlPt2y: 89.429942, endPtx: 376.51366,endPty: 44.060977); |
237 | path.cubicTo(ctrlPt1x: 388.13560,ctrlPt1y: 71.270572, ctrlPt2x: 395.93673,ctrlPt2y: 94.012962, endPtx: 362.83759,endPty: 116.70426); |
238 | path.closeSubpath(); |
239 | return path; |
240 | } |
241 | |
242 | |
243 | QPainterPath Paths::lips() |
244 | { |
245 | QPainterPath path; |
246 | |
247 | path.moveTo(x: 177.02257,y: 176.65905); |
248 | path.cubicTo(ctrlPt1x: 154.11895,ctrlPt1y: 176.65905, ctrlPt2x: 136.56711,ctrlPt2y: 174.32266, endPtx: 110.41800,endPty: 155.61729); |
249 | path.cubicTo(ctrlPt1x: 83.894106,ctrlPt1y: 136.64382, ctrlPt2x: 70.456540,ctrlPt2y: 123.78263, endPtx: 44.264608,endPty: 101.00195); |
250 | path.cubicTo(ctrlPt1x: 36.985036,ctrlPt1y: 94.670475, ctrlPt2x: 11.607987,ctrlPt2y: 76.421189, endPtx: 0.62503194,endPty: 72.562763); |
251 | path.cubicTo(ctrlPt1x: 22.778258,ctrlPt1y: 60.937514, ctrlPt2x: 46.738237,ctrlPt2y: 46.430325, endPtx: 55.325084,endPty: 40.325054); |
252 | path.cubicTo(ctrlPt1x: 79.128700,ctrlPt1y: 23.400628, ctrlPt2x: 99.203004,ctrlPt2y: 0.53294656, endPtx: 116.15033,endPty: 0.61582047); |
253 | path.cubicTo(ctrlPt1x: 129.59137,ctrlPt1y: 0.68308215, ctrlPt2x: 144.54744,ctrlPt2y: 18.524567, endPtx: 177.02257,endPty: 18.524567); |
254 | path.cubicTo(ctrlPt1x: 210.04060,ctrlPt1y: 18.524567, ctrlPt2x: 224.45379,ctrlPt2y: 0.68308215, endPtx: 237.89483,endPty: 0.61582047); |
255 | path.cubicTo(ctrlPt1x: 254.84216,ctrlPt1y: 0.53294656, ctrlPt2x: 274.91646,ctrlPt2y: 23.400628, endPtx: 298.72008,endPty: 40.325054); |
256 | path.cubicTo(ctrlPt1x: 307.30692,ctrlPt1y: 46.430325, ctrlPt2x: 331.26690,ctrlPt2y: 60.937514, endPtx: 353.42013,endPty: 72.562763); |
257 | path.cubicTo(ctrlPt1x: 342.43717,ctrlPt1y: 76.421189, ctrlPt2x: 317.06013,ctrlPt2y: 94.670475, endPtx: 309.78055,endPty: 101.00195); |
258 | path.cubicTo(ctrlPt1x: 283.58862,ctrlPt1y: 123.78263, ctrlPt2x: 270.15105,ctrlPt2y: 136.64382, endPtx: 243.62716,endPty: 155.61729); |
259 | path.cubicTo(ctrlPt1x: 217.47805,ctrlPt1y: 174.32266, ctrlPt2x: 199.38332,ctrlPt2y: 176.65905, endPtx: 177.02257,endPty: 176.65905); |
260 | path.closeSubpath(); |
261 | |
262 | return path; |
263 | } |
264 | |
265 | QPainterPath Paths::bezier1() |
266 | { |
267 | QPainterPath path; |
268 | path.moveTo(x: 50, y: 50); |
269 | path.cubicTo(ctrlPt1x: 100, ctrlPt1y: 100, |
270 | ctrlPt2x: 520, ctrlPt2y: 90, |
271 | endPtx: 400,endPty: 400); |
272 | return path; |
273 | } |
274 | |
275 | QPainterPath Paths::bezier2() |
276 | { |
277 | QPainterPath path; |
278 | path.moveTo(x: 200,y: 200); |
279 | path.cubicTo(ctrlPt1x: 200,ctrlPt1y: 125, ctrlPt2x: 500,ctrlPt2y: 100, endPtx: 500,endPty: 500); |
280 | |
281 | return path; |
282 | } |
283 | |
284 | QPainterPath Paths::random1() |
285 | { |
286 | QPainterPath path; |
287 | |
288 | path.moveTo(x: 65.714286,y: 91.428571); |
289 | path.lineTo(x: 217.14286, y: 102.85714); |
290 | path.cubicTo(ctrlPt1x: 219.04762, ctrlPt1y: 106.66666, |
291 | ctrlPt2x: 220.95238, ctrlPt2y: 110.47619, |
292 | endPtx: 222.85714,endPty: 114.28571); |
293 | path.cubicTo(ctrlPt1x: 231.2679, ctrlPt1y: 131.10723, |
294 | ctrlPt2x: 214.72525, ctrlPt2y: 138.24185, |
295 | endPtx: 211.42857,endPty: 151.42857); |
296 | path.cubicTo(ctrlPt1x: 207.25902, ctrlPt1y: 168.10676, |
297 | ctrlPt2x: 213.24674, ctrlPt2y: 175.8441, |
298 | endPtx: 217.14286,endPty: 191.42857); |
299 | path.cubicTo(ctrlPt1x: 221.088, ctrlPt1y: 207.20915, |
300 | ctrlPt2x: 201.21538,ctrlPt2y: 205.71429, |
301 | endPtx: 188.57143,endPty: 205.71429); |
302 | path.cubicTo(ctrlPt1x: 170.18303, ctrlPt1y: 205.71429, |
303 | ctrlPt2x: 161.42918, ctrlPt2y: 197.50045, |
304 | endPtx: 145.71429,endPty: 185.71429); |
305 | path.cubicTo(ctrlPt1x: 113.93441, ctrlPt1y: 161.87938, |
306 | ctrlPt2x: 132.73699, ctrlPt2y: 182.37652, |
307 | endPtx: 137.14286, endPty: 200); |
308 | path.cubicTo(ctrlPt1x: 140.37884, ctrlPt1y: 212.94392, |
309 | ctrlPt2x: 128.50252, ctrlPt2y: 217.16009, |
310 | endPtx: 117.14286, endPty: 220); |
311 | path.cubicTo(ctrlPt1x: 98.323209, ctrlPt1y: 224.70491, |
312 | ctrlPt2x: 91.206108, ctrlPt2y: 205.41767, |
313 | endPtx: 82.857143, endPty: 194.28571); |
314 | path.cubicTo(ctrlPt1x: 77.307286, ctrlPt1y: 186.8859, |
315 | ctrlPt2x: 84.541768, ctrlPt2y: 158.97578, |
316 | endPtx: 85.714286, endPty: 154.28571); |
317 | path.cubicTo(ctrlPt1x: 87.843677, ctrlPt1y: 145.76815, |
318 | ctrlPt2x: 67.066253, ctrlPt2y: 132.78054, |
319 | endPtx: 60 , endPty: 125.71429); |
320 | path.cubicTo(ctrlPt1x: 54.074503, ctrlPt1y: 119.78879, |
321 | ctrlPt2x: 64.646395, ctrlPt2y: 95.700137, |
322 | endPtx: 65.714286, endPty: 91.428571); |
323 | path.closeSubpath(); |
324 | |
325 | return path; |
326 | } |
327 | |
328 | QPainterPath Paths::random2() |
329 | { |
330 | QPainterPath path; |
331 | |
332 | path.moveTo(x: 314.28571,y: 160); |
333 | path.cubicTo(ctrlPt1x: 434.28571,ctrlPt1y: 125.71429, |
334 | ctrlPt2x: 505.71429,ctrlPt2y: 200, |
335 | endPtx: 505.71429,endPty: 200); |
336 | path.lineTo(x: 454.28571, y: 305.71429); |
337 | path.lineTo(x: 337.14286, y: 302.85714); |
338 | path.cubicTo(ctrlPt1x: 337.14286, ctrlPt1y: 302.85714, |
339 | ctrlPt2x: 308.57143, ctrlPt2y: 340, |
340 | endPtx: 337.14286, endPty: 302.85714); |
341 | path.cubicTo(ctrlPt1x: 365.71429, ctrlPt1y: 265.71429, |
342 | ctrlPt2x: 200, ctrlPt2y: 420, |
343 | endPtx: 300, endPty: 291.42857); |
344 | path.cubicTo(ctrlPt1x: 400, ctrlPt1y: 162.85714, |
345 | ctrlPt2x: 254.28571, ctrlPt2y: 240, |
346 | endPtx: 254.28571, endPty: 240); |
347 | path.cubicTo(ctrlPt1x: 254.28571,ctrlPt1y: 240, |
348 | ctrlPt2x: 240,ctrlPt2y: 71.428571, |
349 | endPtx: 288.57143,endPty: 134.28571); |
350 | path.cubicTo(ctrlPt1x: 337.14286,ctrlPt1y: 197.14286, |
351 | ctrlPt2x: 314.28571,ctrlPt2y: 162.85714, |
352 | endPtx: 314.28571,endPty: 160); |
353 | path.closeSubpath(); |
354 | |
355 | return path; |
356 | } |
357 | |
358 | QPainterPath Paths::bezier3() |
359 | { |
360 | QPainterPath path; |
361 | path.moveTo(x: 295, y: 217); |
362 | path.cubicTo(ctrlPt1x: 364, ctrlPt1y: 57, |
363 | ctrlPt2x: 377, ctrlPt2y: 34, |
364 | endPtx: 456, endPty: 222); |
365 | return path; |
366 | } |
367 | |
368 | QPainterPath Paths::bezier4() |
369 | { |
370 | QPainterPath path; |
371 | path.moveTo(x: 200, y: 125); |
372 | path.cubicTo(ctrlPt1x: 200, ctrlPt1y: 125, |
373 | ctrlPt2x: 623, ctrlPt2y: 126, |
374 | endPtx: 623, endPty: 126); |
375 | return path; |
376 | } |
377 | |
378 | QPainterPath Paths::heart2() |
379 | { |
380 | QPainterPath path; |
381 | path.moveTo(x: 263.41570, y: 235.14588); |
382 | path.cubicTo(ctrlPt1x: 197.17570,ctrlPt1y: 235.14588, |
383 | ctrlPt2x: 143.41575,ctrlPt2y: 288.90587, |
384 | endPtx: 143.41575,endPty: 355.14588); |
385 | path.cubicTo(ctrlPt1x: 143.41575, ctrlPt1y: 489.90139, |
386 | ctrlPt2x: 279.34890, ctrlPt2y: 525.23318, |
387 | endPtx: 371.97820, endPty: 658.45392); |
388 | return path; |
389 | } |
390 | |
391 | QPainterPath Paths::rect2() |
392 | { |
393 | QPainterPath path; |
394 | |
395 | path.addRect(x: 80, y: 80, w: 100, h: 100); |
396 | |
397 | return path; |
398 | } |
399 | |
400 | |
401 | QPainterPath Paths::rect3() |
402 | { |
403 | QPainterPath path; |
404 | |
405 | path.addRect(x: 100, y: 40, w: 100, h: 100); |
406 | |
407 | return path; |
408 | } |
409 | |
410 | |
411 | QPainterPath Paths::rect4() |
412 | { |
413 | QPainterPath path; |
414 | |
415 | path.addRect(x: 100, y: 0, w: 200, h: 200); |
416 | |
417 | path.addRect(x: 120, y: 20, w: 80, h: 80); |
418 | |
419 | return path; |
420 | } |
421 | |
422 | QPainterPath Paths::simpleCurve() |
423 | { |
424 | QPainterPath path; |
425 | path.moveTo(x: 74, y: 160); |
426 | path.cubicTo( ctrlPt1x: 74, ctrlPt1y: 160, |
427 | ctrlPt2x: 274, ctrlPt2y: 406, |
428 | endPtx: 425, endPty: 166); |
429 | path.cubicTo(ctrlPt1x: 577, ctrlPt1y: -73, |
430 | ctrlPt2x: 77, ctrlPt2y: 160, |
431 | endPtx: 74, endPty: 160); |
432 | path.closeSubpath(); |
433 | |
434 | return path; |
435 | } |
436 | |
437 | QPainterPath Paths::simpleCurve2() |
438 | { |
439 | QPainterPath path; |
440 | path.moveTo(x: 54, y: 140); |
441 | path.cubicTo( ctrlPt1x: 54, ctrlPt1y: 140, |
442 | ctrlPt2x: 254, ctrlPt2y: 386, |
443 | endPtx: 405, endPty: 146); |
444 | path.cubicTo(ctrlPt1x: 557, ctrlPt1y: -93, |
445 | ctrlPt2x: 57, ctrlPt2y: 140, |
446 | endPtx: 54, endPty: 140); |
447 | path.closeSubpath(); |
448 | |
449 | return path; |
450 | } |
451 | |
452 | QPainterPath Paths::frame1() |
453 | { |
454 | QPainterPath path; |
455 | path.moveTo(x: 190.71429, y: 40.933613); |
456 | path.lineTo(x: 683.57141, y: 40.933613); |
457 | path.cubicTo(ctrlPt1x: 697.42141, ctrlPt1y: 40.933613, |
458 | ctrlPt2x: 708.57141, ctrlPt2y: 52.083613, |
459 | endPtx: 708.57141, endPty: 65.933613); |
460 | path.lineTo(x: 708.57141, y: 375.93361); |
461 | path.cubicTo(ctrlPt1x: 708.57141, ctrlPt1y: 389.78361, |
462 | ctrlPt2x: 697.42141, ctrlPt2y: 400.93361, |
463 | endPtx: 683.57141, endPty: 400.93361); |
464 | path.lineTo(x: 190.71429, y: 400.93361); |
465 | path.cubicTo(ctrlPt1x: 176.86429, ctrlPt1y: 400.93361, |
466 | ctrlPt2x: 165.71429, ctrlPt2y: 389.78361, |
467 | endPtx: 165.71429,endPty: 375.93361); |
468 | path.lineTo(x: 165.71429, y: 65.933613); |
469 | path.cubicTo(ctrlPt1x: 165.71429,ctrlPt1y: 52.083613, |
470 | ctrlPt2x: 176.86429,ctrlPt2y: 40.933613, |
471 | endPtx: 190.71429,endPty: 40.933613); |
472 | path.closeSubpath(); |
473 | |
474 | return path; |
475 | } |
476 | |
477 | QPainterPath Paths::frame2() |
478 | { |
479 | QPainterPath path; |
480 | path.moveTo(x: 55.114286, y: 103.79076); |
481 | path.lineTo(x: 187.74288, y: 103.79076); |
482 | path.cubicTo(ctrlPt1x: 192.95048, ctrlPt1y: 103.79076, |
483 | ctrlPt2x: 197.14288, ctrlPt2y: 107.88102, |
484 | endPtx: 197.14288, endPty: 112.96176); |
485 | path.lineTo(x: 197.14288, y: 131.76261); |
486 | path.cubicTo(ctrlPt1x: 197.14288, ctrlPt1y: 136.84335, |
487 | ctrlPt2x: 192.95048, ctrlPt2y: 140.93361, |
488 | endPtx: 187.74288, endPty: 140.93361); |
489 | path.lineTo(x: 55.114286, y: 140.93361); |
490 | path.cubicTo(ctrlPt1x: 49.906687, ctrlPt1y: 140.93361, |
491 | ctrlPt2x: 45.714287, ctrlPt2y: 136.84335, |
492 | endPtx: 45.714287, endPty: 131.76261); |
493 | path.lineTo(x: 45.714287, y: 112.96176); |
494 | path.cubicTo(ctrlPt1x: 45.714287, ctrlPt1y: 107.88102, |
495 | ctrlPt2x: 49.906687, ctrlPt2y: 103.79076, |
496 | endPtx: 55.114286, endPty: 103.79076); |
497 | path.closeSubpath(); |
498 | |
499 | return path; |
500 | } |
501 | |
502 | QPainterPath Paths::frame3() |
503 | { |
504 | QPainterPath path; |
505 | path.moveTo(x: 200,y: 80.933609); |
506 | path.lineTo(x: 682.85715,y: 80.933609); |
507 | path.lineTo(x: 682.85715,y: 446.6479); |
508 | path.lineTo(x: 200,y: 446.6479); |
509 | path.lineTo(x: 200,y: 80.933609); |
510 | path.closeSubpath(); |
511 | return path; |
512 | } |
513 | |
514 | QPainterPath Paths::frame4() |
515 | { |
516 | QPainterPath path; |
517 | |
518 | path.moveTo(x: 88.571434,y: 206.64789); |
519 | path.lineTo(x: 231.42858,y: 206.64789); |
520 | path.lineTo(x: 231.42858,y: 246.64789); |
521 | path.lineTo(x: 88.571434,y: 246.64789); |
522 | path.lineTo(x: 88.571434,y: 206.64789); |
523 | path.closeSubpath(); |
524 | |
525 | return path; |
526 | } |
527 | |
528 | QPainterPath Paths::simpleCurve3() |
529 | { |
530 | QPainterPath path; |
531 | |
532 | path.moveTo(x: 0, y: 0); |
533 | path.cubicTo(ctrlPt1x: 400,ctrlPt1y: 0, |
534 | ctrlPt2x: 0,ctrlPt2y: 400, |
535 | endPtx: 0,endPty: 0); |
536 | path.closeSubpath(); |
537 | |
538 | return path; |
539 | } |
540 | |
541 | QPainterPath Paths::rect5() |
542 | { |
543 | QPainterPath path; |
544 | |
545 | path.addRect(x: 0, y: 0, w: 200, h: 200); |
546 | |
547 | return path; |
548 | } |
549 | |
550 | QPainterPath Paths::triangle1() |
551 | { |
552 | QPainterPath path; |
553 | |
554 | path.moveTo(x: 0, y: 0); |
555 | path.lineTo(x: 60, y: 0); |
556 | path.lineTo(x: 60, y: 60); |
557 | path.closeSubpath(); |
558 | |
559 | return path; |
560 | } |
561 | |
562 | QPainterPath Paths::triangle2() |
563 | { |
564 | QPainterPath path; |
565 | |
566 | path.moveTo(x: 0, y: 120); |
567 | path.lineTo(x: 60, y: 120); |
568 | path.lineTo(x: 60, y: 60); |
569 | path.closeSubpath(); |
570 | |
571 | return path; |
572 | } |
573 | |
574 | QPainterPath Paths::node() |
575 | { |
576 | QRectF m_rect; |
577 | m_rect.setWidth(150); |
578 | m_rect.setHeight(100); |
579 | |
580 | QPainterPath shape; |
581 | shape.addRoundedRect(rect: m_rect, xRadius: 25, yRadius: Qt::RelativeSize); |
582 | |
583 | const int conWidth = 10; |
584 | const int xOffset = 7; |
585 | |
586 | QRectF rect(xOffset, |
587 | conWidth + 20, |
588 | conWidth, conWidth); |
589 | shape.addEllipse(rect); |
590 | //shape.addRect(rect); |
591 | |
592 | rect = QRectF(m_rect.right() - conWidth - xOffset, |
593 | conWidth + 20, |
594 | conWidth, conWidth); |
595 | shape.addEllipse(rect); |
596 | //shape.addRect(rect); |
597 | return shape; |
598 | } |
599 | |
600 | QPainterPath Paths::interRect() |
601 | { |
602 | QPainterPath path; |
603 | path.addRect(x: 132, y: 42, w: 1, h: 1); |
604 | return path; |
605 | } |
606 | |
607 | QPainterPath Paths::bezierFlower() |
608 | { |
609 | QPainterPath path; |
610 | path.moveTo(x: 0, y: 0); |
611 | path.cubicTo(ctrlPt1x: 0, ctrlPt1y: 50, ctrlPt2x: -25, ctrlPt2y: 75, endPtx: -50, endPty: 100); |
612 | path.closeSubpath(); |
613 | path.moveTo(x: 0, y: 0); |
614 | path.cubicTo(ctrlPt1x: 0, ctrlPt1y: 50, ctrlPt2x: 25, ctrlPt2y: 75, endPtx: 50, endPty: 100); |
615 | path.closeSubpath(); |
616 | |
617 | path.moveTo(x: 0, y: 0); |
618 | path.cubicTo(ctrlPt1x: 0, ctrlPt1y: -50, ctrlPt2x: -25, ctrlPt2y: -75, endPtx: -50, endPty: -100); |
619 | path.closeSubpath(); |
620 | path.moveTo(x: 0, y: 0); |
621 | path.cubicTo(ctrlPt1x: 0, ctrlPt1y: -50, ctrlPt2x: 25, ctrlPt2y: -75, endPtx: 50, endPty: -100); |
622 | path.closeSubpath(); |
623 | |
624 | path.moveTo(x: 0, y: 0); |
625 | path.cubicTo(ctrlPt1x: -50, ctrlPt1y: 0, ctrlPt2x: -75, ctrlPt2y: -25, endPtx: -100, endPty: -50); |
626 | path.closeSubpath(); |
627 | path.moveTo(x: 0, y: 0); |
628 | path.cubicTo(ctrlPt1x: -50, ctrlPt1y: 0, ctrlPt2x: -75, ctrlPt2y: 25, endPtx: -100, endPty: 50); |
629 | path.closeSubpath(); |
630 | |
631 | path.moveTo(x: 0, y: 0); |
632 | path.cubicTo(ctrlPt1x: 50, ctrlPt1y: 0, ctrlPt2x: 75, ctrlPt2y: -25, endPtx: 100, endPty: -50); |
633 | path.closeSubpath(); |
634 | path.moveTo(x: 0, y: 0); |
635 | path.cubicTo(ctrlPt1x: 50, ctrlPt1y: 0, ctrlPt2x: 75, ctrlPt2y: 25, endPtx: 100, endPty: 50); |
636 | path.closeSubpath(); |
637 | |
638 | return path; |
639 | } |
640 | |
641 | QPainterPath Paths::clover() |
642 | { |
643 | QPainterPath path; |
644 | path.moveTo(x: 50, y: 50); |
645 | path.lineTo(x: 100, y: 25); |
646 | path.lineTo(x: 100, y: 75); |
647 | path.lineTo(x: 0, y: 25); |
648 | path.lineTo(x: 0, y: 75); |
649 | path.lineTo(x: 50, y: 50); |
650 | path.lineTo(x: 75, y: 0); |
651 | path.lineTo(x: 25, y: 0); |
652 | path.lineTo(x: 75, y: 100); |
653 | path.lineTo(x: 25, y: 100); |
654 | path.lineTo(x: 50, y: 50); |
655 | return path; |
656 | } |
657 | |
658 | QPainterPath Paths::ellipses() |
659 | { |
660 | QPainterPath path; |
661 | path.addEllipse(x: 0, y: 0, w: 100, h: 100); |
662 | path.addEllipse(x: 0, y: 20, w: 100, h: 60); |
663 | path.addEllipse(x: 0, y: 40, w: 100, h: 20); |
664 | return path; |
665 | } |
666 | |
667 | QPainterPath Paths::windingFill() |
668 | { |
669 | QPainterPath path; |
670 | path.addRect(x: 0, y: 0, w: 100, h: 100); |
671 | path.addRect(x: 50, y: 25, w: 100, h: 50); |
672 | path.setFillRule(Qt::WindingFill); |
673 | return path; |
674 | } |
675 | |
676 | QPainterPath Paths::oddEvenFill() |
677 | { |
678 | QPainterPath path; |
679 | path.addRect(x: 0, y: 0, w: 100, h: 100); |
680 | path.moveTo(x: 50, y: 25); |
681 | path.lineTo(x: 50, y: 75); |
682 | path.lineTo(x: 150, y: 75); |
683 | path.lineTo(x: 150, y: 25); |
684 | path.lineTo(x: 50, y: 25); |
685 | path.setFillRule(Qt::OddEvenFill); |
686 | return path; |
687 | } |
688 | |
689 | QPainterPath Paths::squareWithHole() |
690 | { |
691 | QPainterPath path; |
692 | path.addRect(x: 0, y: 0, w: 100, h: 100); |
693 | path.addRect(x: 30, y: 30, w: 40, h: 40); |
694 | return path; |
695 | } |
696 | |
697 | QPainterPath Paths::circleWithHole() |
698 | { |
699 | QPainterPath path; |
700 | path.addEllipse(x: 0, y: 0, w: 100, h: 100); |
701 | path.addEllipse(x: 30, y: 30, w: 40, h: 40); |
702 | return path; |
703 | } |
704 | |
705 | QPainterPath Paths::bezierQuadrant() |
706 | { |
707 | QPainterPath path; |
708 | int d = 1; |
709 | for (int i = 25; i <= 85; i += 10) { |
710 | path.moveTo(x: 50, y: 100); |
711 | path.cubicTo(ctrlPt1x: 50, ctrlPt1y: i, ctrlPt2x: 50 + i* d / 2, ctrlPt2y: 0, endPtx: 50 + 50 * d, endPty: 0); |
712 | path.lineTo(x: 50 + 50 * d, y: 100); |
713 | path.closeSubpath(); |
714 | } |
715 | |
716 | return path; |
717 | } |
718 | |