18#include <initializer_list>
65 path.moveTo(375, -30);
66 path.cubicTo(578, -30, 749, 176, 749, 422);
67 path.cubicTo(749, 583, 666, 706, 518, 765);
68 path.lineTo(163, 611);
69 path.lineTo(163, 579);
70 path.lineTo(405, 684);
71 path.cubicTo(551, 609, 645, 468, 645, 322);
72 path.cubicTo(645, 183, 563, 82, 450, 82);
73 path.cubicTo(303, 82, 179, 249, 179, 446);
74 path.cubicTo(179, 579, 235, 689, 341, 768);
75 path.lineTo(327, 786);
76 path.cubicTo(165, 717, 56, 536, 56, 335);
77 path.cubicTo(56, 125, 192, -30, 375, -30);
79 path.moveTo(214, 225);
80 path.cubicTo(333, 248, 396, 311, 396, 405);
81 path.lineTo(396, 695);
82 path.lineTo(267, 641);
83 path.lineTo(267, 395);
84 path.cubicTo(267, 324, 249, 285, 201, 254);
85 path.cubicTo(201, 254, 214, 225, 214, 225);
87 path.moveTo(682, -106);
91 path.cubicTo(716, 29, 668, 76, 628, 140);
93 path.cubicTo(575, -26, 628, -77, 682, -106);
97 path.lineTo(480, 678);
98 path.lineTo(450, 678);
99 path.cubicTo(450, 678, 450, 59, 450, 59);
101 path.moveTo(463, 374);
102 path.lineTo(633, 459);
103 path.lineTo(633, 490);
104 path.lineTo(463, 406);
105 path.cubicTo(463, 406, 463, 374, 463, 374);
107 path.moveTo(463, 269);
108 path.lineTo(667, 372);
109 path.lineTo(667, 403);
110 path.lineTo(463, 301);
111 path.cubicTo(463, 301, 463, 269, 463, 269);
117 path2.
cubicTo(-83.5464f, 184.285f, -84.8599f, 181.114f, -87.4868f, 178.487f);
118 path2.
cubicTo(-90.1138f, 175.86f, -93.2849f, 174.546f, -97, 174.546f);
119 path2.
cubicTo(-100.715f, 174.546f, -103.886f, 175.86f, -106.513f, 178.487f);
120 path2.
cubicTo(-109.14f, 181.114f, -110.454f, 184.285f, -110.454f, 188);
121 path2.
cubicTo(-110.454f, 191.715f, -109.14f, 194.886f, -106.513f, 197.513f);
122 path2.
cubicTo(-103.886f, 200.14f, -100.715f, 201.454f, -97, 201.454f);
123 path2.
cubicTo(-93.2849f, 201.454f, -90.1138f, 200.14f, -87.4868f, 197.513f);
124 path2.
cubicTo(-84.8599f, 194.886f, -83.5464f, 191.715f, -83.5464f, 188);
142 path.moveTo(375, -30);
143 path.cubicTo(578, -30, 749, 176, 749, 422);
144 path.cubicTo(749, 583, 666, 706, 518, 765);
145 path.lineTo(163, 611);
146 path.lineTo(163, 579);
147 path.lineTo(405, 684);
148 path.cubicTo(551, 609, 645, 468, 645, 322);
149 path.cubicTo(645, 183, 563, 82, 450, 82);
150 path.cubicTo(303, 82, 179, 249, 179, 446);
151 path.cubicTo(179, 579, 235, 689, 341, 768);
152 path.lineTo(327, 786);
153 path.cubicTo(165, 717, 56, 536, 56, 335);
154 path.cubicTo(56, 125, 192, -30, 375, -30);
156 path.moveTo(214, 225);
157 path.cubicTo(333, 248, 396, 311, 396, 405);
158 path.lineTo(396, 695);
159 path.lineTo(267, 641);
160 path.lineTo(267, 395);
161 path.cubicTo(267, 324, 249, 285, 201, 254);
162 path.cubicTo(201, 254, 214, 225, 214, 225);
164 path.moveTo(682, -106);
165 path.lineTo(832, 12);
166 path.lineTo(813, 33);
168 path.cubicTo(716, 29, 668, 76, 628, 140);
169 path.lineTo(527, 44);
170 path.cubicTo(575, -26, 628, -77, 682, -106);
172 path.moveTo(450, 59);
173 path.lineTo(480, 59);
174 path.lineTo(480, 678);
175 path.lineTo(450, 678);
176 path.cubicTo(450, 678, 450, 59, 450, 59);
178 path.moveTo(463, 374);
179 path.lineTo(633, 459);
180 path.lineTo(633, 490);
181 path.lineTo(463, 406);
182 path.cubicTo(463, 406, 463, 374, 463, 374);
184 path.moveTo(463, 269);
185 path.lineTo(667, 372);
186 path.lineTo(667, 403);
187 path.lineTo(463, 301);
188 path.cubicTo(463, 301, 463, 269, 463, 269);
194 path2.
cubicTo(269.134f, 67.6241f, 267.82f, 64.453f, 265.193f, 61.826f);
195 path2.
cubicTo(262.566f, 59.1991f, 259.395f, 57.8856f, 255.68f, 57.8856f);
196 path2.
cubicTo(251.965f, 57.8856f, 248.794f, 59.1991f, 246.167f, 61.826f);
197 path2.
cubicTo(243.54f, 64.453f, 242.226f, 67.6241f, 242.226f, 71.3392f);
198 path2.
cubicTo(242.226f, 75.0543f, 243.54f, 78.2255f, 246.167f, 80.8524f);
199 path2.
cubicTo(248.794f, 83.4794f, 251.965f, 84.7928f, 255.68f, 84.7928f);
200 path2.
cubicTo(259.395f, 84.7928f, 262.566f, 83.4794f, 265.193f, 80.8524f);
201 path2.
cubicTo(267.82f, 78.2255f, 269.134f, 75.0543f, 269.134f, 71.3392f);
224 path.moveTo(375, -30);
225 path.cubicTo(578, -30, 749, 176, 749, 422);
226 path.cubicTo(749, 583, 666, 706, 518, 765);
227 path.lineTo(163, 611);
228 path.lineTo(163, 579);
229 path.lineTo(405, 684);
230 path.cubicTo(551, 609, 645, 468, 645, 322);
231 path.cubicTo(645, 183, 563, 82, 450, 82);
232 path.cubicTo(303, 82, 179, 249, 179, 446);
233 path.cubicTo(179, 579, 235, 689, 341, 768);
234 path.lineTo(327, 786);
235 path.cubicTo(165, 717, 56, 536, 56, 335);
236 path.cubicTo(56, 125, 192, -30, 375, -30);
238 path.moveTo(214, 225);
239 path.cubicTo(333, 248, 396, 311, 396, 405);
240 path.lineTo(396, 695);
241 path.lineTo(267, 641);
242 path.lineTo(267, 395);
243 path.cubicTo(267, 324, 249, 285, 201, 254);
244 path.cubicTo(201, 254, 214, 225, 214, 225);
246 path.moveTo(682, -106);
247 path.lineTo(832, 12);
248 path.lineTo(813, 33);
250 path.cubicTo(716, 29, 668, 76, 628, 140);
251 path.lineTo(527, 44);
252 path.cubicTo(575, -26, 628, -77, 682, -106);
254 path.moveTo(450, 59);
255 path.lineTo(480, 59);
256 path.lineTo(480, 678);
257 path.lineTo(450, 678);
258 path.cubicTo(450, 678, 450, 59, 450, 59);
260 path.moveTo(463, 374);
261 path.lineTo(633, 459);
262 path.lineTo(633, 490);
263 path.lineTo(463, 406);
264 path.cubicTo(463, 406, 463, 374, 463, 374);
266 path.moveTo(463, 269);
267 path.lineTo(667, 372);
268 path.lineTo(667, 403);
269 path.lineTo(463, 301);
270 path.cubicTo(463, 301, 463, 269, 463, 269);
276 path2.
cubicTo(492.041f, 521.624f, 490.727f, 518.453f, 488.1f, 515.826f);
277 path2.
cubicTo(485.473f, 513.199f, 482.302f, 511.886f, 478.587f, 511.886f);
278 path2.
cubicTo(474.872f, 511.886f, 471.701f, 513.199f, 469.074f, 515.826f);
279 path2.
cubicTo(466.447f, 518.453f, 465.134f, 521.624f, 465.134f, 525.339f);
280 path2.
cubicTo(465.134f, 529.054f, 466.447f, 532.226f, 469.074f, 534.853f);
281 path2.
cubicTo(471.701f, 537.479f, 474.872f, 538.793f, 478.587f, 538.793f);
282 path2.
cubicTo(482.302f, 538.793f, 485.473f, 537.479f, 488.1f, 534.853f);
283 path2.
cubicTo(490.727f, 532.226f, 492.041f, 529.054f, 492.041f, 525.339f);
300 for (
int moveX = 199; moveX <= 201; ++moveX) {
301 for (
int moveY = 299; moveY <= 301; ++moveY) {
302 for (
int lineX = 199; lineX <= 201; ++lineX) {
303 for (
int lineY = 199; lineY <= 201; ++lineY) {
306 path.addCircle(250, 250, 150);
332 for (
int moveX = 199; moveX <= 201; ++moveX) {
333 for (
int moveY = 299; moveY <= 301; ++moveY) {
334 for (
int lineX = 199; lineX <= 201; ++lineX) {
335 for (
int lineY = 199; lineY <= 201; ++lineY) {
338 path.addRect(100, 100, 400, 400);
364 std::string originalPathStr =
365 "M5.93 -3.12C5.93 -5.03 4.73 -6.06 3.5 -6.06C2.67 -6.06 1.98 -5.59 1.76 -5.34L1.67 "
366 "-5.93L0.75 -5.93L0.75 2.23L1.87 2.04L1.87 -0.12C2.12 -0.03 2.62 0.07 3.18 0.07C4.57 "
367 "0.07 5.93 -1.06 5.93 -3.12ZM4.81 -3.09C4.81 -1.51 4.18 -0.85 3.17 -0.85C2.57 -0.85 "
368 "2.15 -0.98 1.87 -1.12L1.87 -4.15C2.34 -4.73 2.75 -5.09 3.42 -5.09C4.31 -5.09 4.81 "
387 std::string originalPathStr =
415 std::string originalPathStr =
444 test.addRect({1, 2, 3, 4});
455 test.addCircle(5, 5, 10);
467 SkPoint ell[] = {{0, 0}, {4, 0}, {4, 1}, {1, 1}, {1, 4}, {0, 4}};
475 test.addRect({5, 2, 6, 3});
484 test.addRect({2, 2, 3, 3});
492 test.addRect({0, 0, 3, 3});
493 test.addRect({1, 1, 4, 4});
506 constexpr SkRect rectA = {0, 0, 3, 3};
507 constexpr SkRect rectB = {1, 1, 2, 2};
508 const std::initializer_list<SkPoint> revBccw = {{1, 2}, {2, 2}, {2, 1}, {1, 1}};
509 const std::initializer_list<SkPoint> revBcw = {{2, 1}, {2, 2}, {1, 2}, {1, 1}};
510 for (
bool aFirst : {
false,
true}) {
516 test.addRect(rectA, dirA);
517 test.addRect(rectB, dirB);
519 test.addRect(rectB, dirB);
520 test.addRect(rectA, dirA);
527 test.addRect(rectA, dirA);
530 test.addRect(rectB, dirB);
535 test.addRect(rectA, dirA);
547 for (
bool aFirst : {
false,
true}) {
565 bool evenOddContains =
test.contains(
x,
y);
566 bool windingContains =
result.contains(
x,
y);
void bug12040_4(skiatest::Reporter *reporter)
void bug12040_3(skiatest::Reporter *reporter)
void bug13496_3(skiatest::Reporter *reporter)
DEF_TEST(PathOpsAsWinding, reporter)
void bug12040_2(skiatest::Reporter *reporter)
static SkPath build_squircle(SkPath::Verb verb, const SkRect &rect, SkPathDirection dir)
void bug13496_1(skiatest::Reporter *reporter)
void bug13496_2(skiatest::Reporter *reporter)
void bug12040_1(skiatest::Reporter *reporter)
void bug12040_5(skiatest::Reporter *reporter)
static size_t difference(size_t minuend, size_t subtrahend)
bool SK_API AsWinding(const SkPath &path, SkPath *result)
@ kDifference_SkPathOp
subtract the op path from the first path
@ kXOR_SkPathOp
exclusive-or the two paths
bool SK_API Simplify(const SkPath &path, SkPath *result)
#define SK_ScalarInfinity
#define REPORTER_ASSERT(r, cond,...)
static bool FromSVGString(const char str[], SkPath *)
SkPath & reverseAddPath(const SkPath &src)
SkPath & moveTo(SkScalar x, SkScalar y)
SkPathFillType getFillType() const
void setFillType(SkPathFillType ft)
SkPath & lineTo(SkScalar x, SkScalar y)
SkPath & cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar x3, SkScalar y3)
sk_sp< SkBlender > blender SkRect rect
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets dir
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
SkScalar fBottom
larger y-axis bounds
SkScalar fLeft
smaller x-axis bounds
SkScalar fRight
larger x-axis bounds
SkScalar fTop
smaller y-axis bounds