blob: 109a7fc0bd53fc5cf991058d7a606288b4f9495d [file] [log] [blame]
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +00001/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00002 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +00006 */
7
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +00008#include "gm.h"
Mike Klein33d20552017-03-22 13:47:51 -04009#include "sk_tool_utils.h"
bungemand3ebb482015-08-05 13:57:49 -070010#include "SkPath.h"
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000011#include "SkRandom.h"
caryclark5cb00a92015-08-26 09:04:55 -070012#include "SkDashPathEffect.h"
13#include "SkParsePath.h"
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000014
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000015#define W 400
16#define H 400
17#define N 50
18
mtkleindbfd7ab2016-09-01 11:24:54 -070019constexpr SkScalar SW = SkIntToScalar(W);
20constexpr SkScalar SH = SkIntToScalar(H);
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000021
scroggof9d61012014-12-15 12:54:51 -080022static void rnd_rect(SkRect* r, SkPaint* paint, SkRandom& rand) {
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000023 SkScalar x = rand.nextUScalar1() * W;
24 SkScalar y = rand.nextUScalar1() * H;
25 SkScalar w = rand.nextUScalar1() * (W >> 2);
26 SkScalar h = rand.nextUScalar1() * (H >> 2);
epoger@google.com17b78942011-08-26 14:40:38 +000027 SkScalar hoffset = rand.nextSScalar1();
28 SkScalar woffset = rand.nextSScalar1();
rmistry@google.comae933ce2012-08-23 18:19:56 +000029
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000030 r->set(x, y, x + w, y + h);
epoger@google.com17b78942011-08-26 14:40:38 +000031 r->offset(-w/2 + woffset, -h/2 + hoffset);
rmistry@google.comae933ce2012-08-23 18:19:56 +000032
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000033 paint->setColor(rand.nextU());
34 paint->setAlpha(0xFF);
35}
36
rmistry@google.comae933ce2012-08-23 18:19:56 +000037
reed@google.com4384fab2012-06-05 16:14:23 +000038class StrokesGM : public skiagm::GM {
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000039public:
40 StrokesGM() {}
rmistry@google.comae933ce2012-08-23 18:19:56 +000041
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000042protected:
commit-bot@chromium.orga90c6802014-04-30 13:20:45 +000043
mtklein36352bf2015-03-25 18:17:31 -070044 SkString onShortName() override {
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000045 return SkString("strokes_round");
46 }
rmistry@google.comae933ce2012-08-23 18:19:56 +000047
mtklein36352bf2015-03-25 18:17:31 -070048 SkISize onISize() override {
reed@google.com4384fab2012-06-05 16:14:23 +000049 return SkISize::Make(W, H*2);
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000050 }
rmistry@google.comae933ce2012-08-23 18:19:56 +000051
mtklein36352bf2015-03-25 18:17:31 -070052 void onDraw(SkCanvas* canvas) override {
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000053 SkPaint paint;
54 paint.setStyle(SkPaint::kStroke_Style);
55 paint.setStrokeWidth(SkIntToScalar(9)/2);
rmistry@google.comae933ce2012-08-23 18:19:56 +000056
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000057 for (int y = 0; y < 2; y++) {
58 paint.setAntiAlias(!!y);
59 SkAutoCanvasRestore acr(canvas, true);
60 canvas->translate(0, SH * y);
61 canvas->clipRect(SkRect::MakeLTRB(
62 SkIntToScalar(2), SkIntToScalar(2)
63 , SW - SkIntToScalar(2), SH - SkIntToScalar(2)
64 ));
rmistry@google.comae933ce2012-08-23 18:19:56 +000065
scroggof9d61012014-12-15 12:54:51 -080066 SkRandom rand;
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000067 for (int i = 0; i < N; i++) {
68 SkRect r;
69 rnd_rect(&r, &paint, rand);
70 canvas->drawOval(r, paint);
71 rnd_rect(&r, &paint, rand);
72 canvas->drawRoundRect(r, r.width()/4, r.height()/4, paint);
73 rnd_rect(&r, &paint, rand);
74 }
75 }
76 }
rmistry@google.comae933ce2012-08-23 18:19:56 +000077
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000078private:
reed@google.com4384fab2012-06-05 16:14:23 +000079 typedef skiagm::GM INHERITED;
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +000080};
81
caryclark5cb00a92015-08-26 09:04:55 -070082/* See
83 https://code.google.com/p/chromium/issues/detail?id=422974 and
84 http://jsfiddle.net/1xnku3sg/2/
85 */
86class ZeroLenStrokesGM : public skiagm::GM {
87 SkPath fMoveHfPath, fMoveZfPath, fDashedfPath, fRefPath[4];
caryclark6651a322015-09-09 13:20:49 -070088 SkPath fCubicPath, fQuadPath, fLinePath;
caryclark5cb00a92015-08-26 09:04:55 -070089protected:
90 void onOnceBeforeDraw() override {
91
92 SkAssertResult(SkParsePath::FromSVGString("M0,0h0M10,0h0M20,0h0", &fMoveHfPath));
93 SkAssertResult(SkParsePath::FromSVGString("M0,0zM10,0zM20,0z", &fMoveZfPath));
94 SkAssertResult(SkParsePath::FromSVGString("M0,0h25", &fDashedfPath));
caryclark6651a322015-09-09 13:20:49 -070095 SkAssertResult(SkParsePath::FromSVGString("M 0 0 C 0 0 0 0 0 0", &fCubicPath));
96 SkAssertResult(SkParsePath::FromSVGString("M 0 0 Q 0 0 0 0", &fQuadPath));
97 SkAssertResult(SkParsePath::FromSVGString("M 0 0 L 0 0", &fLinePath));
caryclark5cb00a92015-08-26 09:04:55 -070098
99 for (int i = 0; i < 3; ++i) {
100 fRefPath[0].addCircle(i * 10.f, 0, 5);
101 fRefPath[1].addCircle(i * 10.f, 0, 10);
102 fRefPath[2].addRect(i * 10.f - 4, -2, i * 10.f + 4, 6);
103 fRefPath[3].addRect(i * 10.f - 10, -10, i * 10.f + 10, 10);
104 }
105 }
106
107 SkString onShortName() override {
108 return SkString("zeroPath");
109 }
110
111 SkISize onISize() override {
112 return SkISize::Make(W, H*2);
113 }
114
115 void onDraw(SkCanvas* canvas) override {
116 SkPaint fillPaint, strokePaint, dashPaint;
117 fillPaint.setAntiAlias(true);
118 strokePaint = fillPaint;
119 strokePaint.setStyle(SkPaint::kStroke_Style);
120 for (int i = 0; i < 2; ++i) {
121 fillPaint.setAlpha(255);
122 strokePaint.setAlpha(255);
123 strokePaint.setStrokeWidth(i ? 8.f : 10.f);
124 strokePaint.setStrokeCap(i ? SkPaint::kSquare_Cap : SkPaint::kRound_Cap);
125 canvas->save();
126 canvas->translate(10 + i * 100.f, 10);
127 canvas->drawPath(fMoveHfPath, strokePaint);
128 canvas->translate(0, 20);
129 canvas->drawPath(fMoveZfPath, strokePaint);
130 dashPaint = strokePaint;
131 const SkScalar intervals[] = { 0, 10 };
reeda4393342016-03-18 11:22:57 -0700132 dashPaint.setPathEffect(SkDashPathEffect::Make(intervals, 2, 0));
caryclark5cb00a92015-08-26 09:04:55 -0700133 SkPath fillPath;
134 dashPaint.getFillPath(fDashedfPath, &fillPath);
135 canvas->translate(0, 20);
136 canvas->drawPath(fDashedfPath, dashPaint);
137 canvas->translate(0, 20);
138 canvas->drawPath(fRefPath[i * 2], fillPaint);
139 strokePaint.setStrokeWidth(20);
140 strokePaint.setAlpha(127);
141 canvas->translate(0, 50);
142 canvas->drawPath(fMoveHfPath, strokePaint);
143 canvas->translate(0, 30);
144 canvas->drawPath(fMoveZfPath, strokePaint);
145 canvas->translate(0, 30);
146 fillPaint.setAlpha(127);
147 canvas->drawPath(fRefPath[1 + i * 2], fillPaint);
caryclark6651a322015-09-09 13:20:49 -0700148 canvas->translate(0, 30);
149 canvas->drawPath(fCubicPath, strokePaint);
150 canvas->translate(0, 30);
151 canvas->drawPath(fQuadPath, strokePaint);
152 canvas->translate(0, 30);
153 canvas->drawPath(fLinePath, strokePaint);
caryclark5cb00a92015-08-26 09:04:55 -0700154 canvas->restore();
155 }
156 }
157
158private:
159 typedef skiagm::GM INHERITED;
160};
161
caryclark950305e2015-10-26 08:17:04 -0700162class TeenyStrokesGM : public skiagm::GM {
163
164 SkString onShortName() override {
165 return SkString("teenyStrokes");
166 }
167
168 SkISize onISize() override {
169 return SkISize::Make(W, H*2);
170 }
171
172 static void line(SkScalar scale, SkCanvas* canvas, SkColor color) {
173 SkPaint p;
174 p.setAntiAlias(true);
175 p.setStyle(SkPaint::kStroke_Style);
176 p.setColor(color);
177 canvas->translate(50, 0);
178 canvas->save();
179 p.setStrokeWidth(scale * 5);
180 canvas->scale(1 / scale, 1 / scale);
181 canvas->drawLine(20 * scale, 20 * scale, 20 * scale, 100 * scale, p);
182 canvas->drawLine(20 * scale, 20 * scale, 100 * scale, 100 * scale, p);
183 canvas->restore();
184 }
185
186 void onDraw(SkCanvas* canvas) override {
187 line(0.00005f, canvas, SK_ColorBLACK);
188 line(0.000045f, canvas, SK_ColorRED);
189 line(0.0000035f, canvas, SK_ColorGREEN);
190 line(0.000003f, canvas, SK_ColorBLUE);
191 line(0.000002f, canvas, SK_ColorBLACK);
192 }
193private:
194 typedef skiagm::GM INHERITED;
195};
196
caryclarkb775e912015-11-30 13:47:11 -0800197DEF_SIMPLE_GM(CubicStroke, canvas, 384, 384) {
198 SkPaint p;
199 p.setAntiAlias(true);
200 p.setStyle(SkPaint::kStroke_Style);
201 p.setStrokeWidth(1.0720f);
202 SkPath path;
203 path.moveTo(-6000,-6000);
204 path.cubicTo(-3500,5500,-500,5500,2500,-6500);
205 canvas->drawPath(path, p);
206 p.setStrokeWidth(1.0721f);
207 canvas->translate(10, 10);
208 canvas->drawPath(path, p);
209 p.setStrokeWidth(1.0722f);
210 canvas->translate(10, 10);
211 canvas->drawPath(path, p);
212}
caryclark950305e2015-10-26 08:17:04 -0700213
caryclark57eecc12015-12-08 04:29:45 -0800214DEF_SIMPLE_GM(zerolinestroke, canvas, 90, 120) {
215 SkPaint paint;
216 paint.setStyle(SkPaint::kStroke_Style);
217 paint.setStrokeWidth(20);
218 paint.setAntiAlias(true);
219 paint.setStrokeCap(SkPaint::kRound_Cap);
220
221 SkPath path;
222 path.moveTo(30, 90);
223 path.lineTo(30, 90);
224 path.lineTo(60, 90);
225 path.lineTo(60, 90);
226 canvas->drawPath(path, paint);
227
228 path.reset();
229 path.moveTo(30, 30);
230 path.lineTo(60, 30);
231 canvas->drawPath(path, paint);
232
233 path.reset();
234 path.moveTo(30, 60);
235 path.lineTo(30, 60);
236 path.lineTo(60, 60);
237 canvas->drawPath(path, paint);
238}
239
caryclark40b7d3b2015-12-22 06:13:33 -0800240DEF_SIMPLE_GM(quadcap, canvas, 200, 200) {
241 SkPaint p;
242 p.setAntiAlias(true);
243 p.setStyle(SkPaint::kStroke_Style);
244 p.setStrokeWidth(0);
245 SkPath path;
246 SkPoint pts[] = {{105.738571f,13.126318f},
halcanary9d524f22016-03-29 09:03:52 -0700247 {105.738571f,13.126318f},
caryclark40b7d3b2015-12-22 06:13:33 -0800248 {123.753784f,1.f}};
249 SkVector tangent = pts[1] - pts[2];
250 tangent.normalize();
251 SkPoint pts2[3];
252 memcpy(pts2, pts, sizeof(pts));
253 const SkScalar capOutset = SK_ScalarPI / 8;
254 pts2[0].fX += tangent.fX * capOutset;
255 pts2[0].fY += tangent.fY * capOutset;
256 pts2[1].fX += tangent.fX * capOutset;
257 pts2[1].fY += tangent.fY * capOutset;
258 pts2[2].fX += -tangent.fX * capOutset;
259 pts2[2].fY += -tangent.fY * capOutset;
260 path.moveTo(pts2[0]);
261 path.quadTo(pts2[1], pts2[2]);
262 canvas->drawPath(path, p);
263
264 path.reset();
265 path.moveTo(pts[0]);
266 path.quadTo(pts[1], pts[2]);
267 p.setStrokeCap(SkPaint::kRound_Cap);
268 canvas->translate(30, 0);
269 canvas->drawPath(path, p);
270}
271
reed@google.com4384fab2012-06-05 16:14:23 +0000272class Strokes2GM : public skiagm::GM {
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +0000273 SkPath fPath;
caryclark63c684a2015-02-25 09:04:04 -0800274protected:
mtklein36352bf2015-03-25 18:17:31 -0700275 void onOnceBeforeDraw() override {
scroggof9d61012014-12-15 12:54:51 -0800276 SkRandom rand;
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +0000277 fPath.moveTo(0, 0);
278 for (int i = 0; i < 13; i++) {
279 SkScalar x = rand.nextUScalar1() * (W >> 1);
280 SkScalar y = rand.nextUScalar1() * (H >> 1);
281 fPath.lineTo(x, y);
282 }
283 }
rmistry@google.comae933ce2012-08-23 18:19:56 +0000284
commit-bot@chromium.orga90c6802014-04-30 13:20:45 +0000285
mtklein36352bf2015-03-25 18:17:31 -0700286 SkString onShortName() override {
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +0000287 return SkString("strokes_poly");
288 }
rmistry@google.comae933ce2012-08-23 18:19:56 +0000289
mtklein36352bf2015-03-25 18:17:31 -0700290 SkISize onISize() override {
reed@google.com4384fab2012-06-05 16:14:23 +0000291 return SkISize::Make(W, H*2);
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +0000292 }
rmistry@google.comae933ce2012-08-23 18:19:56 +0000293
mtklein36352bf2015-03-25 18:17:31 -0700294 void onDraw(SkCanvas* canvas) override {
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +0000295 canvas->drawColor(SK_ColorWHITE);
rmistry@google.comae933ce2012-08-23 18:19:56 +0000296
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +0000297 SkPaint paint;
298 paint.setStyle(SkPaint::kStroke_Style);
299 paint.setStrokeWidth(SkIntToScalar(9)/2);
rmistry@google.comae933ce2012-08-23 18:19:56 +0000300
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +0000301 for (int y = 0; y < 2; y++) {
302 paint.setAntiAlias(!!y);
303 SkAutoCanvasRestore acr(canvas, true);
304 canvas->translate(0, SH * y);
305 canvas->clipRect(SkRect::MakeLTRB(SkIntToScalar(2),
306 SkIntToScalar(2),
307 SW - SkIntToScalar(2),
308 SH - SkIntToScalar(2)));
rmistry@google.comae933ce2012-08-23 18:19:56 +0000309
scroggof9d61012014-12-15 12:54:51 -0800310 SkRandom rand;
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +0000311 for (int i = 0; i < N/2; i++) {
312 SkRect r;
313 rnd_rect(&r, &paint, rand);
bungeman7438bfc2016-07-12 15:01:19 -0700314 canvas->rotate(SkIntToScalar(15), SW/2, SH/2);
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +0000315 canvas->drawPath(fPath, paint);
316 }
317 }
318 }
rmistry@google.comae933ce2012-08-23 18:19:56 +0000319
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +0000320private:
reed@google.com4384fab2012-06-05 16:14:23 +0000321 typedef skiagm::GM INHERITED;
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +0000322};
323
324//////////////////////////////////////////////////////////////////////////////
325
reed@google.com4384fab2012-06-05 16:14:23 +0000326static SkRect inset(const SkRect& r) {
327 SkRect rr(r);
328 rr.inset(r.width()/10, r.height()/10);
329 return rr;
mike@reedtribe.orgf2c21cd2011-06-18 00:15:04 +0000330}
331
reed@google.com4384fab2012-06-05 16:14:23 +0000332class Strokes3GM : public skiagm::GM {
333 static void make0(SkPath* path, const SkRect& bounds, SkString* title) {
334 path->addRect(bounds, SkPath::kCW_Direction);
335 path->addRect(inset(bounds), SkPath::kCW_Direction);
336 title->set("CW CW");
337 }
rmistry@google.comae933ce2012-08-23 18:19:56 +0000338
reed@google.com4384fab2012-06-05 16:14:23 +0000339 static void make1(SkPath* path, const SkRect& bounds, SkString* title) {
340 path->addRect(bounds, SkPath::kCW_Direction);
341 path->addRect(inset(bounds), SkPath::kCCW_Direction);
342 title->set("CW CCW");
343 }
rmistry@google.comae933ce2012-08-23 18:19:56 +0000344
reed@google.com4384fab2012-06-05 16:14:23 +0000345 static void make2(SkPath* path, const SkRect& bounds, SkString* title) {
346 path->addOval(bounds, SkPath::kCW_Direction);
347 path->addOval(inset(bounds), SkPath::kCW_Direction);
348 title->set("CW CW");
349 }
rmistry@google.comae933ce2012-08-23 18:19:56 +0000350
reed@google.com4384fab2012-06-05 16:14:23 +0000351 static void make3(SkPath* path, const SkRect& bounds, SkString* title) {
352 path->addOval(bounds, SkPath::kCW_Direction);
353 path->addOval(inset(bounds), SkPath::kCCW_Direction);
354 title->set("CW CCW");
355 }
rmistry@google.comae933ce2012-08-23 18:19:56 +0000356
reed@google.com4384fab2012-06-05 16:14:23 +0000357 static void make4(SkPath* path, const SkRect& bounds, SkString* title) {
358 path->addRect(bounds, SkPath::kCW_Direction);
359 SkRect r = bounds;
360 r.inset(bounds.width() / 10, -bounds.height() / 10);
361 path->addOval(r, SkPath::kCW_Direction);
362 title->set("CW CW");
363 }
rmistry@google.comae933ce2012-08-23 18:19:56 +0000364
reed@google.com4384fab2012-06-05 16:14:23 +0000365 static void make5(SkPath* path, const SkRect& bounds, SkString* title) {
366 path->addRect(bounds, SkPath::kCW_Direction);
367 SkRect r = bounds;
368 r.inset(bounds.width() / 10, -bounds.height() / 10);
369 path->addOval(r, SkPath::kCCW_Direction);
370 title->set("CW CCW");
371 }
372
373public:
374 Strokes3GM() {}
rmistry@google.comae933ce2012-08-23 18:19:56 +0000375
reed@google.com4384fab2012-06-05 16:14:23 +0000376protected:
commit-bot@chromium.orga90c6802014-04-30 13:20:45 +0000377
mtklein36352bf2015-03-25 18:17:31 -0700378 SkString onShortName() override {
reed@google.com4384fab2012-06-05 16:14:23 +0000379 return SkString("strokes3");
380 }
rmistry@google.comae933ce2012-08-23 18:19:56 +0000381
mtklein36352bf2015-03-25 18:17:31 -0700382 SkISize onISize() override {
caryclark37604572015-02-23 06:51:04 -0800383 return SkISize::Make(1500, 1500);
reed@google.com4384fab2012-06-05 16:14:23 +0000384 }
rmistry@google.comae933ce2012-08-23 18:19:56 +0000385
mtklein36352bf2015-03-25 18:17:31 -0700386 void onDraw(SkCanvas* canvas) override {
reed@google.com4384fab2012-06-05 16:14:23 +0000387 SkPaint origPaint;
388 origPaint.setAntiAlias(true);
389 origPaint.setStyle(SkPaint::kStroke_Style);
390 SkPaint fillPaint(origPaint);
391 fillPaint.setColor(SK_ColorRED);
392 SkPaint strokePaint(origPaint);
caryclark12596012015-07-29 05:27:47 -0700393 strokePaint.setColor(sk_tool_utils::color_to_565(0xFF4444FF));
reed@google.com4384fab2012-06-05 16:14:23 +0000394
395 void (*procs[])(SkPath*, const SkRect&, SkString*) = {
396 make0, make1, make2, make3, make4, make5
397 };
398
caryclark37604572015-02-23 06:51:04 -0800399 canvas->translate(SkIntToScalar(20), SkIntToScalar(80));
reed@google.com4384fab2012-06-05 16:14:23 +0000400
401 SkRect bounds = SkRect::MakeWH(SkIntToScalar(50), SkIntToScalar(50));
402 SkScalar dx = bounds.width() * 4/3;
403 SkScalar dy = bounds.height() * 5;
404
405 for (size_t i = 0; i < SK_ARRAY_COUNT(procs); ++i) {
406 SkPath orig;
407 SkString str;
408 procs[i](&orig, bounds, &str);
rmistry@google.comae933ce2012-08-23 18:19:56 +0000409
reed@google.com4384fab2012-06-05 16:14:23 +0000410 canvas->save();
411 for (int j = 0; j < 13; ++j) {
412 strokePaint.setStrokeWidth(SK_Scalar1 * j * j);
413 canvas->drawPath(orig, strokePaint);
414 canvas->drawPath(orig, origPaint);
415 SkPath fill;
416 strokePaint.getFillPath(orig, &fill);
417 canvas->drawPath(fill, fillPaint);
418 canvas->translate(dx + strokePaint.getStrokeWidth(), 0);
419 }
420 canvas->restore();
421 canvas->translate(0, dy);
422 }
423 }
rmistry@google.comae933ce2012-08-23 18:19:56 +0000424
reed@google.com4384fab2012-06-05 16:14:23 +0000425private:
426 typedef skiagm::GM INHERITED;
427};
428
caryclark612f70d2015-05-19 11:05:37 -0700429class Strokes4GM : public skiagm::GM {
430public:
431 Strokes4GM() {}
432
433protected:
434
435 SkString onShortName() override {
436 return SkString("strokes_zoomed");
437 }
438
439 SkISize onISize() override {
440 return SkISize::Make(W, H*2);
441 }
442
443 void onDraw(SkCanvas* canvas) override {
444 SkPaint paint;
445 paint.setStyle(SkPaint::kStroke_Style);
446 paint.setStrokeWidth(0.055f);
halcanary9d524f22016-03-29 09:03:52 -0700447
caryclark612f70d2015-05-19 11:05:37 -0700448 canvas->scale(1000, 1000);
449 canvas->drawCircle(0, 2, 1.97f, paint);
450 }
451
452private:
453 typedef skiagm::GM INHERITED;
454};
455
caryclark45398df2015-08-25 13:19:06 -0700456// Test stroking for curves that produce degenerate tangents when t is 0 or 1 (see bug 4191)
457class Strokes5GM : public skiagm::GM {
458public:
459 Strokes5GM() {}
460
461protected:
462
463 SkString onShortName() override {
464 return SkString("zero_control_stroke");
465 }
466
467 SkISize onISize() override {
468 return SkISize::Make(W, H*2);
469 }
470
471 void onDraw(SkCanvas* canvas) override {
472 SkPaint p;
473 p.setColor(SK_ColorRED);
474 p.setAntiAlias(true);
475 p.setStyle(SkPaint::kStroke_Style);
476 p.setStrokeWidth(40);
477 p.setStrokeCap(SkPaint::kButt_Cap);
478
479 SkPath path;
480 path.moveTo(157.474f,111.753f);
481 path.cubicTo(128.5f,111.5f,35.5f,29.5f,35.5f,29.5f);
482 canvas->drawPath(path, p);
483 path.reset();
484 path.moveTo(250, 50);
485 path.quadTo(280, 80, 280, 80);
486 canvas->drawPath(path, p);
487 path.reset();
488 path.moveTo(150, 50);
489 path.conicTo(180, 80, 180, 80, 0.707f);
490 canvas->drawPath(path, p);
491
492 path.reset();
493 path.moveTo(157.474f,311.753f);
494 path.cubicTo(157.474f,311.753f,85.5f,229.5f,35.5f,229.5f);
495 canvas->drawPath(path, p);
496 path.reset();
497 path.moveTo(280, 250);
498 path.quadTo(280, 250, 310, 280);
499 canvas->drawPath(path, p);
500 path.reset();
501 path.moveTo(180, 250);
502 path.conicTo(180, 250, 210, 280, 0.707f);
503 canvas->drawPath(path, p);
504 }
505
506private:
507 typedef skiagm::GM INHERITED;
508};
509
caryclark612f70d2015-05-19 11:05:37 -0700510
reed@google.com4384fab2012-06-05 16:14:23 +0000511//////////////////////////////////////////////////////////////////////////////
512
scroggo96f16e82015-12-10 13:31:59 -0800513DEF_GM( return new StrokesGM; )
514DEF_GM( return new Strokes2GM; )
515DEF_GM( return new Strokes3GM; )
516DEF_GM( return new Strokes4GM; )
517DEF_GM( return new Strokes5GM; )
caryclark5cb00a92015-08-26 09:04:55 -0700518
halcanary385fe4d2015-08-26 13:07:48 -0700519DEF_GM( return new ZeroLenStrokesGM; )
caryclark950305e2015-10-26 08:17:04 -0700520DEF_GM( return new TeenyStrokesGM; )
Cary Clark0b1df4b2017-12-13 12:47:15 -0500521
522DEF_SIMPLE_GM(zerolinedash, canvas, 256, 256) {
523 canvas->clear(SK_ColorWHITE);
524
525 SkPaint paint;
526 paint.setColor(SkColorSetARGB(255, 0, 0, 0));
527 paint.setStrokeWidth(11);
528 paint.setStrokeCap(SkPaint::kRound_Cap);
529 paint.setStrokeJoin(SkPaint::kBevel_Join);
530
531 SkScalar dash_pattern[] = {1, 5};
532 paint.setPathEffect(SkDashPathEffect::Make(dash_pattern, 2, 0));
533
534 canvas->drawLine(100, 100, 100, 100, paint);
535}
Greg Daniel9838b492017-12-21 14:55:00 +0000536
537#ifdef PDF_IS_FIXED_SO_THIS_DOESNT_BREAK_IT
538DEF_SIMPLE_GM(longrect_dash, canvas, 250, 250) {
539 canvas->clear(SK_ColorWHITE);
540
541 SkPaint paint;
542 paint.setColor(SkColorSetARGB(255, 0, 0, 0));
543 paint.setStrokeWidth(5);
544 paint.setStrokeCap(SkPaint::kRound_Cap);
545 paint.setStrokeJoin(SkPaint::kBevel_Join);
546 paint.setStyle(SkPaint::kStroke_Style);
547 SkScalar dash_pattern[] = {1, 5};
548 paint.setPathEffect(SkDashPathEffect::Make(dash_pattern, 2, 0));
549 // try all combinations of stretching bounds
550 for (auto left : { 20.f, -100001.f } ) {
551 for (auto top : { 20.f, -100001.f } ) {
552 for (auto right : { 40.f, 100001.f } ) {
553 for (auto bottom : { 40.f, 100001.f } ) {
554 canvas->save();
555 canvas->clipRect({10, 10, 50, 50});
556 canvas->drawRect({left, top, right, bottom}, paint);
557 canvas->restore();
558 canvas->translate(60, 0);
559 }
560 }
561 canvas->translate(-60 * 4, 60);
562 }
563 }
564}
565#endif
Cary Clarka0e30b12018-02-02 11:02:46 -0500566
567DEF_SIMPLE_GM(bigconic, canvas, 250, 250) {
568 SkPaint paint;
569SkPath path;
570path.setFillType(SkPath::kWinding_FillType);
571path.moveTo(SkBits2Float(0x7f07a5af), SkBits2Float(0xff07ff1d)); // 1.80306e+38f, -1.8077e+38f
572path.lineTo(SkBits2Float(0x7edf4b2d), SkBits2Float(0xfedffe0a)); // 1.48404e+38f, -1.48868e+38f
573path.lineTo(SkBits2Float(0x7edf4585), SkBits2Float(0xfee003b2)); // 1.48389e+38f, -1.48883e+38f
574path.lineTo(SkBits2Float(0x7ef348e9), SkBits2Float(0xfef403c6)); // 1.6169e+38f, -1.62176e+38f
575path.lineTo(SkBits2Float(0x7ef74c4e), SkBits2Float(0xfef803cb)); // 1.64358e+38f, -1.64834e+38f
576path.conicTo(SkBits2Float(0x7ef74f23), SkBits2Float(0xfef8069e), SkBits2Float(0x7ef751f6), SkBits2Float(0xfef803c9), SkBits2Float(0x3f3504f3)); // 1.64365e+38f, -1.64841e+38f, 1.64372e+38f, -1.64834e+38f, 0.707107f
577path.conicTo(SkBits2Float(0x7ef754c8), SkBits2Float(0xfef800f5), SkBits2Float(0x7ef751f5), SkBits2Float(0xfef7fe22), SkBits2Float(0x3f353472)); // 1.6438e+38f, -1.64827e+38f, 1.64372e+38f, -1.64819e+38f, 0.707832f
578path.lineTo(SkBits2Float(0x7edb57a9), SkBits2Float(0xfedbfe06)); // 1.45778e+38f, -1.4621e+38f
579path.lineTo(SkBits2Float(0x7e875976), SkBits2Float(0xfe87fdb3)); // 8.99551e+37f, -9.03815e+37f
580path.lineTo(SkBits2Float(0x7ded5c2b), SkBits2Float(0xfdeff59e)); // 3.94382e+37f, -3.98701e+37f
581path.lineTo(SkBits2Float(0x7d7a78a7), SkBits2Float(0xfd7fda0f)); // 2.08083e+37f, -2.12553e+37f
582path.lineTo(SkBits2Float(0x7d7a6403), SkBits2Float(0xfd7fe461)); // 2.08016e+37f, -2.12587e+37f
583path.conicTo(SkBits2Float(0x7d7a4764), SkBits2Float(0xfd7ff2b0), SkBits2Float(0x7d7a55b4), SkBits2Float(0xfd8007a8), SkBits2Float(0x3f3504f3)); // 2.07924e+37f, -2.12633e+37f, 2.0797e+37f, -2.12726e+37f, 0.707107f
584path.conicTo(SkBits2Float(0x7d7a5803), SkBits2Float(0xfd8009f7), SkBits2Float(0x7d7a5ba9), SkBits2Float(0xfd800bcc), SkBits2Float(0x3f7cba66)); // 2.07977e+37f, -2.12741e+37f, 2.07989e+37f, -2.12753e+37f, 0.987219f
585path.lineTo(SkBits2Float(0x7d8d2067), SkBits2Float(0xfd900bdb)); // 2.34487e+37f, -2.39338e+37f
586path.lineTo(SkBits2Float(0x7ddd137a), SkBits2Float(0xfde00c2d)); // 3.67326e+37f, -3.72263e+37f
587path.lineTo(SkBits2Float(0x7ddd2a1b), SkBits2Float(0xfddff58e)); // 3.67473e+37f, -3.72116e+37f
588path.lineTo(SkBits2Float(0x7c694ae5), SkBits2Float(0xfc7fa67c)); // 4.8453e+36f, -5.30965e+36f
589path.lineTo(SkBits2Float(0xfc164a8b), SkBits2Float(0x7c005af5)); // -3.12143e+36f, 2.66584e+36f
590path.lineTo(SkBits2Float(0xfc8ae983), SkBits2Float(0x7c802da7)); // -5.77019e+36f, 5.32432e+36f
591path.lineTo(SkBits2Float(0xfc8b16d9), SkBits2Float(0x7c80007b)); // -5.77754e+36f, 5.31699e+36f
592path.lineTo(SkBits2Float(0xfc8b029c), SkBits2Float(0x7c7f8788)); // -5.77426e+36f, 5.30714e+36f
593path.lineTo(SkBits2Float(0xfc8b0290), SkBits2Float(0x7c7f8790)); // -5.77425e+36f, 5.30714e+36f
594path.lineTo(SkBits2Float(0xfc8b16cd), SkBits2Float(0x7c80007f)); // -5.77753e+36f, 5.31699e+36f
595path.lineTo(SkBits2Float(0xfc8b4409), SkBits2Float(0x7c7fa672)); // -5.78487e+36f, 5.30965e+36f
596path.lineTo(SkBits2Float(0x7d7aa2ba), SkBits2Float(0xfd800bd1)); // 2.0822e+37f, -2.12753e+37f
597path.lineTo(SkBits2Float(0x7e8757ee), SkBits2Float(0xfe88035b)); // 8.99512e+37f, -9.03962e+37f
598path.lineTo(SkBits2Float(0x7ef7552d), SkBits2Float(0xfef803ca)); // 1.64381e+38f, -1.64834e+38f
599path.lineTo(SkBits2Float(0x7f0fa653), SkBits2Float(0xff1001f9)); // 1.90943e+38f, -1.91419e+38f
600path.lineTo(SkBits2Float(0x7f0fa926), SkBits2Float(0xff0fff24)); // 1.90958e+38f, -1.91404e+38f
601path.lineTo(SkBits2Float(0x7f0da75c), SkBits2Float(0xff0dff22)); // 1.8829e+38f, -1.88746e+38f
602path.lineTo(SkBits2Float(0x7f07a5af), SkBits2Float(0xff07ff1d)); // 1.80306e+38f, -1.8077e+38f
603path.close();
604path.moveTo(SkBits2Float(0x7f07a2db), SkBits2Float(0xff0801f1)); // 1.80291e+38f, -1.80785e+38f
605path.lineTo(SkBits2Float(0x7f0da48a), SkBits2Float(0xff0e01f8)); // 1.88275e+38f, -1.88761e+38f
606path.lineTo(SkBits2Float(0x7f0fa654), SkBits2Float(0xff1001fa)); // 1.90943e+38f, -1.91419e+38f
607path.lineTo(SkBits2Float(0x7f0fa7bd), SkBits2Float(0xff10008f)); // 1.90951e+38f, -1.91412e+38f
608path.lineTo(SkBits2Float(0x7f0fa927), SkBits2Float(0xff0fff25)); // 1.90958e+38f, -1.91404e+38f
609path.lineTo(SkBits2Float(0x7ef75ad5), SkBits2Float(0xfef7fe22)); // 1.64395e+38f, -1.64819e+38f
610path.lineTo(SkBits2Float(0x7e875d96), SkBits2Float(0xfe87fdb3)); // 8.99659e+37f, -9.03815e+37f
611path.lineTo(SkBits2Float(0x7d7acff6), SkBits2Float(0xfd7fea5b)); // 2.08367e+37f, -2.12606e+37f
612path.lineTo(SkBits2Float(0xfc8b0588), SkBits2Float(0x7c8049b7)); // -5.77473e+36f, 5.32887e+36f
613path.lineTo(SkBits2Float(0xfc8b2b16), SkBits2Float(0x7c803d32)); // -5.78083e+36f, 5.32684e+36f
614path.conicTo(SkBits2Float(0xfc8b395c), SkBits2Float(0x7c803870), SkBits2Float(0xfc8b4405), SkBits2Float(0x7c802dd1), SkBits2Float(0x3f79349d)); // -5.78314e+36f, 5.32607e+36f, -5.78487e+36f, 5.32435e+36f, 0.973459f
615path.conicTo(SkBits2Float(0xfc8b715b), SkBits2Float(0x7c8000a5), SkBits2Float(0xfc8b442f), SkBits2Float(0x7c7fa69e), SkBits2Float(0x3f3504f3)); // -5.79223e+36f, 5.31702e+36f, -5.7849e+36f, 5.30966e+36f, 0.707107f
616path.lineTo(SkBits2Float(0xfc16ffaa), SkBits2Float(0x7bff4c12)); // -3.13612e+36f, 2.65116e+36f
617path.lineTo(SkBits2Float(0x7c6895e0), SkBits2Float(0xfc802dc0)); // 4.83061e+36f, -5.32434e+36f
618path.lineTo(SkBits2Float(0x7ddd137b), SkBits2Float(0xfde00c2e)); // 3.67326e+37f, -3.72263e+37f
619path.lineTo(SkBits2Float(0x7ddd1ecb), SkBits2Float(0xfde000de)); // 3.67399e+37f, -3.72189e+37f
620path.lineTo(SkBits2Float(0x7ddd2a1c), SkBits2Float(0xfddff58f)); // 3.67473e+37f, -3.72116e+37f
621path.lineTo(SkBits2Float(0x7d8d3711), SkBits2Float(0xfd8ff543)); // 2.34634e+37f, -2.39191e+37f
622path.lineTo(SkBits2Float(0x7d7a88fe), SkBits2Float(0xfd7fea69)); // 2.08136e+37f, -2.12606e+37f
623path.lineTo(SkBits2Float(0x7d7a7254), SkBits2Float(0xfd800080)); // 2.08063e+37f, -2.1268e+37f
624path.lineTo(SkBits2Float(0x7d7a80a4), SkBits2Float(0xfd800ed0)); // 2.08109e+37f, -2.12773e+37f
625path.lineTo(SkBits2Float(0x7d7a80a8), SkBits2Float(0xfd800ecf)); // 2.08109e+37f, -2.12773e+37f
626path.lineTo(SkBits2Float(0x7d7a7258), SkBits2Float(0xfd80007f)); // 2.08063e+37f, -2.1268e+37f
627path.lineTo(SkBits2Float(0x7d7a5bb9), SkBits2Float(0xfd800bd0)); // 2.0799e+37f, -2.12753e+37f
628path.lineTo(SkBits2Float(0x7ded458b), SkBits2Float(0xfdf00c3e)); // 3.94235e+37f, -3.98848e+37f
629path.lineTo(SkBits2Float(0x7e8753ce), SkBits2Float(0xfe88035b)); // 8.99405e+37f, -9.03962e+37f
630path.lineTo(SkBits2Float(0x7edb5201), SkBits2Float(0xfedc03ae)); // 1.45763e+38f, -1.46225e+38f
631path.lineTo(SkBits2Float(0x7ef74c4d), SkBits2Float(0xfef803ca)); // 1.64358e+38f, -1.64834e+38f
632path.lineTo(SkBits2Float(0x7ef74f21), SkBits2Float(0xfef800f6)); // 1.64365e+38f, -1.64827e+38f
633path.lineTo(SkBits2Float(0x7ef751f4), SkBits2Float(0xfef7fe21)); // 1.64372e+38f, -1.64819e+38f
634path.lineTo(SkBits2Float(0x7ef34e91), SkBits2Float(0xfef3fe1e)); // 1.61705e+38f, -1.62161e+38f
635path.lineTo(SkBits2Float(0x7edf4b2d), SkBits2Float(0xfedffe0a)); // 1.48404e+38f, -1.48868e+38f
636path.lineTo(SkBits2Float(0x7edf4859), SkBits2Float(0xfee000de)); // 1.48397e+38f, -1.48876e+38f
637path.lineTo(SkBits2Float(0x7edf4585), SkBits2Float(0xfee003b2)); // 1.48389e+38f, -1.48883e+38f
638path.lineTo(SkBits2Float(0x7f07a2db), SkBits2Float(0xff0801f1)); // 1.80291e+38f, -1.80785e+38f
639path.close();
640path.moveTo(SkBits2Float(0xfab120db), SkBits2Float(0x77b50b4f)); // -4.59851e+35f, 7.34402e+33f
641path.lineTo(SkBits2Float(0xfd6597e5), SkBits2Float(0x7d60177f)); // -1.90739e+37f, 1.86168e+37f
642path.lineTo(SkBits2Float(0xfde2cea1), SkBits2Float(0x7de00c2e)); // -3.76848e+37f, 3.72263e+37f
643path.lineTo(SkBits2Float(0xfe316511), SkBits2Float(0x7e300657)); // -5.89495e+37f, 5.84943e+37f
644path.lineTo(SkBits2Float(0xfe415da1), SkBits2Float(0x7e400666)); // -6.42568e+37f, 6.38112e+37f
645path.lineTo(SkBits2Float(0xfe41634a), SkBits2Float(0x7e4000be)); // -6.42641e+37f, 6.38039e+37f
646path.lineTo(SkBits2Float(0xfe41634a), SkBits2Float(0x7e3ff8be)); // -6.42641e+37f, 6.37935e+37f
647path.lineTo(SkBits2Float(0xfe416349), SkBits2Float(0x7e3ff8be)); // -6.42641e+37f, 6.37935e+37f
648path.lineTo(SkBits2Float(0xfe415f69), SkBits2Float(0x7e3ff8be)); // -6.42591e+37f, 6.37935e+37f
649path.lineTo(SkBits2Float(0xfe415bc9), SkBits2Float(0x7e3ff8be)); // -6.42544e+37f, 6.37935e+37f
650path.lineTo(SkBits2Float(0xfe415bc9), SkBits2Float(0x7e4000be)); // -6.42544e+37f, 6.38039e+37f
651path.lineTo(SkBits2Float(0xfe416171), SkBits2Float(0x7e3ffb16)); // -6.42617e+37f, 6.37966e+37f
652path.lineTo(SkBits2Float(0xfe016131), SkBits2Float(0x7dfff5ae)); // -4.29938e+37f, 4.25286e+37f
653path.lineTo(SkBits2Float(0xfe0155e2), SkBits2Float(0x7e000628)); // -4.29791e+37f, 4.25433e+37f
654path.lineTo(SkBits2Float(0xfe0958ea), SkBits2Float(0x7e080630)); // -4.56415e+37f, 4.52018e+37f
655path.lineTo(SkBits2Float(0xfe115c92), SkBits2Float(0x7e100638)); // -4.83047e+37f, 4.78603e+37f
656path.conicTo(SkBits2Float(0xfe11623c), SkBits2Float(0x7e100bdf), SkBits2Float(0xfe1167e2), SkBits2Float(0x7e100636), SkBits2Float(0x3f3504f3)); // -4.8312e+37f, 4.78676e+37f, -4.83194e+37f, 4.78603e+37f, 0.707107f
657path.conicTo(SkBits2Float(0xfe116d87), SkBits2Float(0x7e10008e), SkBits2Float(0xfe1167e2), SkBits2Float(0x7e0ffae8), SkBits2Float(0x3f35240a)); // -4.83267e+37f, 4.78529e+37f, -4.83194e+37f, 4.78456e+37f, 0.707581f
658path.lineTo(SkBits2Float(0xfe016b92), SkBits2Float(0x7dfff5af)); // -4.30072e+37f, 4.25286e+37f
659path.lineTo(SkBits2Float(0xfdc2d963), SkBits2Float(0x7dbff56e)); // -3.23749e+37f, 3.18946e+37f
660path.lineTo(SkBits2Float(0xfd65ae25), SkBits2Float(0x7d5fea3d)); // -1.90811e+37f, 1.86021e+37f
661path.lineTo(SkBits2Float(0xfab448de), SkBits2Float(0xf7b50a19)); // -4.68046e+35f, -7.34383e+33f
662path.lineTo(SkBits2Float(0xfab174d9), SkBits2Float(0x43480000)); // -4.60703e+35f, 200
663path.lineTo(SkBits2Float(0xfab174d9), SkBits2Float(0x7800007f)); // -4.60703e+35f, 1.03848e+34f
664path.lineTo(SkBits2Float(0xfab3f4db), SkBits2Float(0x7800007f)); // -4.67194e+35f, 1.03848e+34f
665path.lineTo(SkBits2Float(0xfab3f4db), SkBits2Float(0x43480000)); // -4.67194e+35f, 200
666path.lineTo(SkBits2Float(0xfab120db), SkBits2Float(0x77b50b4f)); // -4.59851e+35f, 7.34402e+33f
667path.close();
668path.moveTo(SkBits2Float(0xfab59cf2), SkBits2Float(0xf800007e)); // -4.71494e+35f, -1.03847e+34f
669path.lineTo(SkBits2Float(0xfaa7cc52), SkBits2Float(0xf800007f)); // -4.35629e+35f, -1.03848e+34f
670path.lineTo(SkBits2Float(0xfd6580e5), SkBits2Float(0x7d60177f)); // -1.90664e+37f, 1.86168e+37f
671path.lineTo(SkBits2Float(0xfdc2c2c1), SkBits2Float(0x7dc00c0f)); // -3.23602e+37f, 3.19093e+37f
672path.lineTo(SkBits2Float(0xfe016040), SkBits2Float(0x7e000626)); // -4.29925e+37f, 4.25433e+37f
673path.lineTo(SkBits2Float(0xfe115c90), SkBits2Float(0x7e100636)); // -4.83047e+37f, 4.78603e+37f
674path.lineTo(SkBits2Float(0xfe116239), SkBits2Float(0x7e10008f)); // -4.8312e+37f, 4.78529e+37f
675path.lineTo(SkBits2Float(0xfe1167e0), SkBits2Float(0x7e0ffae6)); // -4.83194e+37f, 4.78456e+37f
676path.lineTo(SkBits2Float(0xfe096438), SkBits2Float(0x7e07fade)); // -4.56562e+37f, 4.51871e+37f
677path.lineTo(SkBits2Float(0xfe016130), SkBits2Float(0x7dfff5ac)); // -4.29938e+37f, 4.25286e+37f
678path.lineTo(SkBits2Float(0xfe015b89), SkBits2Float(0x7e00007f)); // -4.29864e+37f, 4.25359e+37f
679path.lineTo(SkBits2Float(0xfe0155e1), SkBits2Float(0x7e000627)); // -4.29791e+37f, 4.25433e+37f
680path.lineTo(SkBits2Float(0xfe415879), SkBits2Float(0x7e4008bf)); // -6.42501e+37f, 6.38143e+37f
681path.lineTo(SkBits2Float(0xfe415f69), SkBits2Float(0x7e4008bf)); // -6.42591e+37f, 6.38143e+37f
682path.lineTo(SkBits2Float(0xfe416349), SkBits2Float(0x7e4008bf)); // -6.42641e+37f, 6.38143e+37f
683path.lineTo(SkBits2Float(0xfe41634a), SkBits2Float(0x7e4008bf)); // -6.42641e+37f, 6.38143e+37f
684path.conicTo(SkBits2Float(0xfe416699), SkBits2Float(0x7e4008bf), SkBits2Float(0xfe4168f1), SkBits2Float(0x7e400668), SkBits2Float(0x3f6c8ed9)); // -6.42684e+37f, 6.38143e+37f, -6.42715e+37f, 6.38113e+37f, 0.924055f
685path.conicTo(SkBits2Float(0xfe416e9a), SkBits2Float(0x7e4000c2), SkBits2Float(0xfe4168f3), SkBits2Float(0x7e3ffb17), SkBits2Float(0x3f3504f3)); // -6.42788e+37f, 6.38039e+37f, -6.42715e+37f, 6.37966e+37f, 0.707107f
686path.lineTo(SkBits2Float(0xfe317061), SkBits2Float(0x7e2ffb07)); // -5.89642e+37f, 5.84796e+37f
687path.lineTo(SkBits2Float(0xfde2e542), SkBits2Float(0x7ddff58e)); // -3.76995e+37f, 3.72116e+37f
688path.lineTo(SkBits2Float(0xfd65c525), SkBits2Float(0x7d5fea3d)); // -1.90886e+37f, 1.86021e+37f
689path.lineTo(SkBits2Float(0xfab6c8db), SkBits2Float(0xf7b50b4f)); // -4.74536e+35f, -7.34402e+33f
690path.lineTo(SkBits2Float(0xfab59cf2), SkBits2Float(0xf800007e)); // -4.71494e+35f, -1.03847e+34f
691path.close();
692path.moveTo(SkBits2Float(0xfab3f4db), SkBits2Float(0x43480000)); // -4.67194e+35f, 200
693path.lineTo(SkBits2Float(0xfab174d9), SkBits2Float(0x43480000)); // -4.60703e+35f, 200
694path.quadTo(SkBits2Float(0xfd0593a5), SkBits2Float(0x7d00007f), SkBits2Float(0xfd659785), SkBits2Float(0x7d6000de)); // -1.10971e+37f, 1.0634e+37f, -1.90737e+37f, 1.86095e+37f
695path.quadTo(SkBits2Float(0xfda2cdf2), SkBits2Float(0x7da0009f), SkBits2Float(0xfdc2ce12), SkBits2Float(0x7dc000be)); // -2.70505e+37f, 2.6585e+37f, -3.23675e+37f, 3.1902e+37f
696path.quadTo(SkBits2Float(0xfde2ce31), SkBits2Float(0x7de000de), SkBits2Float(0xfe0165e9), SkBits2Float(0x7e00007f)); // -3.76845e+37f, 3.72189e+37f, -4.29999e+37f, 4.25359e+37f
697path.quadTo(SkBits2Float(0xfe1164b9), SkBits2Float(0x7e10008f), SkBits2Float(0xfe116239), SkBits2Float(0x7e10008f)); // -4.83153e+37f, 4.78529e+37f, -4.8312e+37f, 4.78529e+37f
698path.quadTo(SkBits2Float(0xfe116039), SkBits2Float(0x7e10008f), SkBits2Float(0xfe095e91), SkBits2Float(0x7e080087)); // -4.83094e+37f, 4.78529e+37f, -4.56488e+37f, 4.51944e+37f
699path.quadTo(SkBits2Float(0xfe015d09), SkBits2Float(0x7e00007f), SkBits2Float(0xfe015b89), SkBits2Float(0x7e00007f)); // -4.29884e+37f, 4.25359e+37f, -4.29864e+37f, 4.25359e+37f
700path.lineTo(SkBits2Float(0xfe415bc9), SkBits2Float(0x7e4000be)); // -6.42544e+37f, 6.38039e+37f
701path.quadTo(SkBits2Float(0xfe415da9), SkBits2Float(0x7e4000be), SkBits2Float(0xfe415f69), SkBits2Float(0x7e4000be)); // -6.42568e+37f, 6.38039e+37f, -6.42591e+37f, 6.38039e+37f
702path.quadTo(SkBits2Float(0xfe416149), SkBits2Float(0x7e4000be), SkBits2Float(0xfe416349), SkBits2Float(0x7e4000be)); // -6.42615e+37f, 6.38039e+37f, -6.42641e+37f, 6.38039e+37f
703path.quadTo(SkBits2Float(0xfe416849), SkBits2Float(0x7e4000be), SkBits2Float(0xfe316ab9), SkBits2Float(0x7e3000af)); // -6.42706e+37f, 6.38039e+37f, -5.89569e+37f, 5.84869e+37f
704path.quadTo(SkBits2Float(0xfe216d29), SkBits2Float(0x7e20009f), SkBits2Float(0xfde2d9f2), SkBits2Float(0x7de000de)); // -5.36431e+37f, 5.31699e+37f, -3.76921e+37f, 3.72189e+37f
705path.quadTo(SkBits2Float(0xfda2d9b2), SkBits2Float(0x7da0009f), SkBits2Float(0xfd65ae85), SkBits2Float(0x7d6000de)); // -2.70582e+37f, 2.6585e+37f, -1.90812e+37f, 1.86095e+37f
706path.quadTo(SkBits2Float(0xfd05a9a6), SkBits2Float(0x7d00007f), SkBits2Float(0xfab3f4db), SkBits2Float(0x43480000)); // -1.11043e+37f, 1.0634e+37f, -4.67194e+35f, 200
707path.close();
708path.moveTo(SkBits2Float(0x7f07a445), SkBits2Float(0xff080087)); // 1.80299e+38f, -1.80778e+38f
709path.quadTo(SkBits2Float(0x7f0ba519), SkBits2Float(0xff0c008b), SkBits2Float(0x7f0da5f3), SkBits2Float(0xff0e008d)); // 1.8562e+38f, -1.86095e+38f, 1.88283e+38f, -1.88753e+38f
710path.quadTo(SkBits2Float(0x7f0fa6d5), SkBits2Float(0xff10008f), SkBits2Float(0x7f0fa7bd), SkBits2Float(0xff10008f)); // 1.90946e+38f, -1.91412e+38f, 1.90951e+38f, -1.91412e+38f
711path.quadTo(SkBits2Float(0x7f0faa7d), SkBits2Float(0xff10008f), SkBits2Float(0x7ef75801), SkBits2Float(0xfef800f6)); // 1.90965e+38f, -1.91412e+38f, 1.64388e+38f, -1.64827e+38f
712path.quadTo(SkBits2Float(0x7ecf5b09), SkBits2Float(0xfed000ce), SkBits2Float(0x7e875ac2), SkBits2Float(0xfe880087)); // 1.37811e+38f, -1.38242e+38f, 8.99585e+37f, -9.03889e+37f
713path.quadTo(SkBits2Float(0x7e0eb505), SkBits2Float(0xfe10008f), SkBits2Float(0x7d7ab958), SkBits2Float(0xfd80007f)); // 4.74226e+37f, -4.78529e+37f, 2.08293e+37f, -2.1268e+37f
714path.quadTo(SkBits2Float(0xfc8ac1cd), SkBits2Float(0x7c80007f), SkBits2Float(0xfc8b16cd), SkBits2Float(0x7c80007f)); // -5.76374e+36f, 5.31699e+36f, -5.77753e+36f, 5.31699e+36f
715path.quadTo(SkBits2Float(0xfc8b36cd), SkBits2Float(0x7c80007f), SkBits2Float(0xfc16a51a), SkBits2Float(0x7c00007f)); // -5.78273e+36f, 5.31699e+36f, -3.12877e+36f, 2.6585e+36f
716path.quadTo(SkBits2Float(0xfab6e4de), SkBits2Float(0x43480000), SkBits2Float(0x7c68f062), SkBits2Float(0xfc80007f)); // -4.7482e+35f, 200, 4.83795e+36f, -5.31699e+36f
717path.lineTo(SkBits2Float(0x7ddd1ecb), SkBits2Float(0xfde000de)); // 3.67399e+37f, -3.72189e+37f
718path.quadTo(SkBits2Float(0x7d9d254b), SkBits2Float(0xfda0009f), SkBits2Float(0x7d8d2bbc), SkBits2Float(0xfd90008f)); // 2.61103e+37f, -2.6585e+37f, 2.3456e+37f, -2.39265e+37f
719path.quadTo(SkBits2Float(0x7d7a64d8), SkBits2Float(0xfd80007f), SkBits2Float(0x7d7a7258), SkBits2Float(0xfd80007f)); // 2.08019e+37f, -2.1268e+37f, 2.08063e+37f, -2.1268e+37f
720path.quadTo(SkBits2Float(0x7d7a9058), SkBits2Float(0xfd80007f), SkBits2Float(0x7ded50db), SkBits2Float(0xfdf000ee)); // 2.0816e+37f, -2.1268e+37f, 3.94309e+37f, -3.98774e+37f
721path.quadTo(SkBits2Float(0x7e2eace5), SkBits2Float(0xfe3000af), SkBits2Float(0x7e8756a2), SkBits2Float(0xfe880087)); // 5.80458e+37f, -5.84869e+37f, 8.99478e+37f, -9.03889e+37f
722path.quadTo(SkBits2Float(0x7ebf56d9), SkBits2Float(0xfec000be), SkBits2Float(0x7edb54d5), SkBits2Float(0xfedc00da)); // 1.27167e+38f, -1.27608e+38f, 1.45771e+38f, -1.46217e+38f
723path.quadTo(SkBits2Float(0x7ef752e1), SkBits2Float(0xfef800f6), SkBits2Float(0x7ef74f21), SkBits2Float(0xfef800f6)); // 1.64375e+38f, -1.64827e+38f, 1.64365e+38f, -1.64827e+38f
724path.quadTo(SkBits2Float(0x7ef74d71), SkBits2Float(0xfef800f6), SkBits2Float(0x7ef34bbd), SkBits2Float(0xfef400f2)); // 1.64361e+38f, -1.64827e+38f, 1.61698e+38f, -1.62168e+38f
725path.quadTo(SkBits2Float(0x7eef4a19), SkBits2Float(0xfef000ee), SkBits2Float(0x7edf4859), SkBits2Float(0xfee000de)); // 1.59035e+38f, -1.5951e+38f, 1.48397e+38f, -1.48876e+38f
726path.lineTo(SkBits2Float(0x7f07a445), SkBits2Float(0xff080087)); // 1.80299e+38f, -1.80778e+38f
727path.close();
728canvas->drawPath(path, paint);
729}