blob: fd2156c1d76772bd3d4fd53f0e461b99002c94e9 [file] [log] [blame]
schenney@chromium.org4da06ab2011-12-20 15:14:18 +00001/*
2 * 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.
6 */
bungemand3ebb482015-08-05 13:57:49 -07007
schenney@chromium.org4da06ab2011-12-20 15:14:18 +00008#include "gm.h"
Mike Klein33d20552017-03-22 13:47:51 -04009#include "sk_tool_utils.h"
schenney@chromium.org4da06ab2011-12-20 15:14:18 +000010#include "SkCanvas.h"
11#include "SkPaint.h"
bungemand3ebb482015-08-05 13:57:49 -070012#include "SkPath.h"
schenney@chromium.org4da06ab2011-12-20 15:14:18 +000013#include "SkRandom.h"
14
halcanary6950de62015-11-07 05:29:00 -080015// https://bug.skia.org/1316 shows that this cubic, when slightly clipped, creates big
reed@google.com22999c62013-05-23 19:30:48 +000016// (incorrect) changes to its control points.
17class ClippedCubicGM : public skiagm::GM {
18public:
19 ClippedCubicGM() {}
skia.committer@gmail.com3e2345a2013-05-24 07:01:26 +000020
reed@google.com22999c62013-05-23 19:30:48 +000021protected:
commit-bot@chromium.orga90c6802014-04-30 13:20:45 +000022
reed@google.com22999c62013-05-23 19:30:48 +000023 SkString onShortName() {
reed@google.com03ca64b2013-05-23 19:39:15 +000024 return SkString("clippedcubic");
reed@google.com22999c62013-05-23 19:30:48 +000025 }
skia.committer@gmail.com3e2345a2013-05-24 07:01:26 +000026
reed@google.com22999c62013-05-23 19:30:48 +000027 SkISize onISize() { return SkISize::Make(1240, 390); }
skia.committer@gmail.com3e2345a2013-05-24 07:01:26 +000028
reed@google.com22999c62013-05-23 19:30:48 +000029 virtual void onDraw(SkCanvas* canvas) {
30 SkPath path;
31 path.moveTo(0, 0);
32 path.cubicTo(140, 150, 40, 10, 170, 150);
skia.committer@gmail.com3e2345a2013-05-24 07:01:26 +000033
reed@google.com22999c62013-05-23 19:30:48 +000034 SkPaint paint;
35 SkRect bounds = path.getBounds();
skia.committer@gmail.com3e2345a2013-05-24 07:01:26 +000036
reed@google.com0f8990c2013-05-23 19:47:05 +000037 for (SkScalar dy = -1; dy <= 1; dy += 1) {
reed@google.com22999c62013-05-23 19:30:48 +000038 canvas->save();
reed@google.com0f8990c2013-05-23 19:47:05 +000039 for (SkScalar dx = -1; dx <= 1; dx += 1) {
reed@google.com22999c62013-05-23 19:30:48 +000040 canvas->save();
41 canvas->clipRect(bounds);
42 canvas->translate(dx, dy);
43 canvas->drawPath(path, paint);
44 canvas->restore();
skia.committer@gmail.com3e2345a2013-05-24 07:01:26 +000045
reed@google.com22999c62013-05-23 19:30:48 +000046 canvas->translate(bounds.width(), 0);
47 }
48 canvas->restore();
49 canvas->translate(0, bounds.height());
50 }
51 }
skia.committer@gmail.com3e2345a2013-05-24 07:01:26 +000052
reed@google.com22999c62013-05-23 19:30:48 +000053private:
54 typedef skiagm::GM INHERITED;
55};
56
caryclark7d173402015-08-20 08:23:52 -070057
58class ClippedCubic2GM : public skiagm::GM {
59public:
60 ClippedCubic2GM() {}
61
62protected:
63
caryclark02833bf2015-08-20 10:53:13 -070064 SkString onShortName() override {
caryclark7d173402015-08-20 08:23:52 -070065 return SkString("clippedcubic2");
66 }
67
caryclark02833bf2015-08-20 10:53:13 -070068 SkISize onISize() override { return SkISize::Make(1240, 390); }
caryclark7d173402015-08-20 08:23:52 -070069
70 void onDraw(SkCanvas* canvas) override {
71 canvas->save();
caryclark05424f72015-08-20 10:35:43 -070072 canvas->translate(-2, 120);
caryclark7d173402015-08-20 08:23:52 -070073 drawOne(canvas, fPath, SkRect::MakeLTRB(0, 0, 80, 150));
74 canvas->translate(0, 170);
75 drawOne(canvas, fPath, SkRect::MakeLTRB(0, 0, 80, 100));
76 canvas->translate(0, 170);
77 drawOne(canvas, fPath, SkRect::MakeLTRB(0, 0, 30, 150));
78 canvas->translate(0, 170);
79 drawOne(canvas, fPath, SkRect::MakeLTRB(0, 0, 10, 150));
80 canvas->restore();
caryclark05424f72015-08-20 10:35:43 -070081 canvas->save();
82 canvas->translate(20, -2);
83 drawOne(canvas, fFlipped, SkRect::MakeLTRB(0, 0, 150, 80));
84 canvas->translate(170, 0);
85 drawOne(canvas, fFlipped, SkRect::MakeLTRB(0, 0, 100, 80));
86 canvas->translate(170, 0);
87 drawOne(canvas, fFlipped, SkRect::MakeLTRB(0, 0, 150, 30));
88 canvas->translate(170, 0);
89 drawOne(canvas, fFlipped, SkRect::MakeLTRB(0, 0, 150, 10));
90 canvas->restore();
caryclark7d173402015-08-20 08:23:52 -070091 }
92
93 void drawOne(SkCanvas* canvas, const SkPath& path, const SkRect& clip) {
94 SkPaint framePaint, fillPaint;
95 framePaint.setStyle(SkPaint::kStroke_Style);
96 canvas->drawRect(clip, framePaint);
97 canvas->drawPath(path, framePaint);
98 canvas->save();
99 canvas->clipRect(clip);
100 canvas->drawPath(path, fillPaint);
101 canvas->restore();
102 }
103
104 void onOnceBeforeDraw() override {
105 fPath.moveTo(69.7030518991886f, 0);
106 fPath.cubicTo( 69.7030518991886f, 21.831149999999997f,
107 58.08369508178456f, 43.66448333333333f, 34.8449814469765f, 65.5f);
108 fPath.cubicTo( 11.608591683531916f, 87.33115f, -0.010765133872116195f, 109.16448333333332f,
109 -0.013089005235602302f, 131);
110 fPath.close();
caryclark05424f72015-08-20 10:35:43 -0700111 fFlipped = fPath;
112 SkMatrix matrix;
113 matrix.reset();
114 matrix.setScaleX(0);
115 matrix.setScaleY(0);
116 matrix.setSkewX(1);
117 matrix.setSkewY(1);
118 fFlipped.transform(matrix);
caryclark7d173402015-08-20 08:23:52 -0700119 }
120
121 SkPath fPath;
caryclark05424f72015-08-20 10:35:43 -0700122 SkPath fFlipped;
caryclark7d173402015-08-20 08:23:52 -0700123private:
124 typedef skiagm::GM INHERITED;
125};
126
127
reed@google.com27b90fa2013-03-08 18:44:01 +0000128class CubicPathGM : public skiagm::GM {
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000129public:
130 CubicPathGM() {}
131
132protected:
commit-bot@chromium.orga90c6802014-04-30 13:20:45 +0000133
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000134 SkString onShortName() {
135 return SkString("cubicpath");
136 }
rmistry@google.comd6176b02012-08-23 18:14:13 +0000137
reed@google.com27b90fa2013-03-08 18:44:01 +0000138 SkISize onISize() { return SkISize::Make(1240, 390); }
rmistry@google.comd6176b02012-08-23 18:14:13 +0000139
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000140 void drawPath(SkPath& path,SkCanvas* canvas,SkColor color,
141 const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join,
142 SkPaint::Style style, SkPath::FillType fill,
143 SkScalar strokeWidth) {
144 path.setFillType(fill);
145 SkPaint paint;
146 paint.setStrokeCap(cap);
147 paint.setStrokeWidth(strokeWidth);
148 paint.setStrokeJoin(join);
149 paint.setColor(color);
150 paint.setStyle(style);
151 canvas->save();
152 canvas->clipRect(clip);
153 canvas->drawPath(path, paint);
154 canvas->restore();
155 }
rmistry@google.comd6176b02012-08-23 18:14:13 +0000156
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000157 virtual void onDraw(SkCanvas* canvas) {
158 struct FillAndName {
159 SkPath::FillType fFill;
160 const char* fName;
161 };
mtkleindbfd7ab2016-09-01 11:24:54 -0700162 constexpr FillAndName gFills[] = {
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000163 {SkPath::kWinding_FillType, "Winding"},
164 {SkPath::kEvenOdd_FillType, "Even / Odd"},
165 {SkPath::kInverseWinding_FillType, "Inverse Winding"},
166 {SkPath::kInverseEvenOdd_FillType, "Inverse Even / Odd"},
167 };
168 struct StyleAndName {
169 SkPaint::Style fStyle;
170 const char* fName;
171 };
mtkleindbfd7ab2016-09-01 11:24:54 -0700172 constexpr StyleAndName gStyles[] = {
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000173 {SkPaint::kFill_Style, "Fill"},
174 {SkPaint::kStroke_Style, "Stroke"},
175 {SkPaint::kStrokeAndFill_Style, "Stroke And Fill"},
176 };
177 struct CapAndName {
178 SkPaint::Cap fCap;
179 SkPaint::Join fJoin;
180 const char* fName;
181 };
mtkleindbfd7ab2016-09-01 11:24:54 -0700182 constexpr CapAndName gCaps[] = {
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000183 {SkPaint::kButt_Cap, SkPaint::kBevel_Join, "Butt"},
184 {SkPaint::kRound_Cap, SkPaint::kRound_Join, "Round"},
185 {SkPaint::kSquare_Cap, SkPaint::kBevel_Join, "Square"}
186 };
187 struct PathAndName {
188 SkPath fPath;
189 const char* fName;
190 };
191 PathAndName path;
192 path.fPath.moveTo(25*SK_Scalar1, 10*SK_Scalar1);
193 path.fPath.cubicTo(40*SK_Scalar1, 20*SK_Scalar1,
194 60*SK_Scalar1, 20*SK_Scalar1,
195 75*SK_Scalar1, 10*SK_Scalar1);
196 path.fName = "moveTo-cubic";
197
198 SkPaint titlePaint;
199 titlePaint.setColor(SK_ColorBLACK);
200 titlePaint.setAntiAlias(true);
caryclark1818acb2015-07-24 12:09:25 -0700201 sk_tool_utils::set_portable_typeface(&titlePaint);
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000202 titlePaint.setTextSize(15 * SK_Scalar1);
203 const char title[] = "Cubic Drawn Into Rectangle Clips With "
204 "Indicated Style, Fill and Linecaps, with stroke width 10";
205 canvas->drawText(title, strlen(title),
206 20 * SK_Scalar1,
207 20 * SK_Scalar1,
208 titlePaint);
209
scroggof9d61012014-12-15 12:54:51 -0800210 SkRandom rand;
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000211 SkRect rect = SkRect::MakeWH(100*SK_Scalar1, 30*SK_Scalar1);
212 canvas->save();
213 canvas->translate(10 * SK_Scalar1, 30 * SK_Scalar1);
214 canvas->save();
215 for (size_t cap = 0; cap < SK_ARRAY_COUNT(gCaps); ++cap) {
216 if (0 < cap) {
217 canvas->translate((rect.width() + 40 * SK_Scalar1) * SK_ARRAY_COUNT(gStyles), 0);
218 }
219 canvas->save();
220 for (size_t fill = 0; fill < SK_ARRAY_COUNT(gFills); ++fill) {
221 if (0 < fill) {
222 canvas->translate(0, rect.height() + 40 * SK_Scalar1);
223 }
224 canvas->save();
225 for (size_t style = 0; style < SK_ARRAY_COUNT(gStyles); ++style) {
226 if (0 < style) {
227 canvas->translate(rect.width() + 40 * SK_Scalar1, 0);
228 }
rmistry@google.comd6176b02012-08-23 18:14:13 +0000229
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000230 SkColor color = 0xff007000;
231 this->drawPath(path.fPath, canvas, color, rect,
232 gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle,
233 gFills[fill].fFill, SK_Scalar1*10);
rmistry@google.comd6176b02012-08-23 18:14:13 +0000234
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000235 SkPaint rectPaint;
236 rectPaint.setColor(SK_ColorBLACK);
237 rectPaint.setStyle(SkPaint::kStroke_Style);
238 rectPaint.setStrokeWidth(-1);
239 rectPaint.setAntiAlias(true);
240 canvas->drawRect(rect, rectPaint);
rmistry@google.comd6176b02012-08-23 18:14:13 +0000241
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000242 SkPaint labelPaint;
243 labelPaint.setColor(color);
244 labelPaint.setAntiAlias(true);
caryclark1818acb2015-07-24 12:09:25 -0700245 sk_tool_utils::set_portable_typeface(&labelPaint);
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000246 labelPaint.setTextSize(10 * SK_Scalar1);
247 canvas->drawText(gStyles[style].fName,
248 strlen(gStyles[style].fName),
249 0, rect.height() + 12 * SK_Scalar1,
250 labelPaint);
251 canvas->drawText(gFills[fill].fName,
252 strlen(gFills[fill].fName),
253 0, rect.height() + 24 * SK_Scalar1,
254 labelPaint);
255 canvas->drawText(gCaps[cap].fName,
256 strlen(gCaps[cap].fName),
257 0, rect.height() + 36 * SK_Scalar1,
258 labelPaint);
259 }
260 canvas->restore();
261 }
262 canvas->restore();
263 }
264 canvas->restore();
265 canvas->restore();
266 }
rmistry@google.comd6176b02012-08-23 18:14:13 +0000267
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000268private:
reed@google.com27b90fa2013-03-08 18:44:01 +0000269 typedef skiagm::GM INHERITED;
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000270};
271
reed@google.com27b90fa2013-03-08 18:44:01 +0000272class CubicClosePathGM : public skiagm::GM {
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000273public:
274 CubicClosePathGM() {}
275
276protected:
commit-bot@chromium.orga90c6802014-04-30 13:20:45 +0000277
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000278 SkString onShortName() {
279 return SkString("cubicclosepath");
280 }
rmistry@google.comd6176b02012-08-23 18:14:13 +0000281
reed@google.com27b90fa2013-03-08 18:44:01 +0000282 SkISize onISize() { return SkISize::Make(1240, 390); }
rmistry@google.comd6176b02012-08-23 18:14:13 +0000283
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000284 void drawPath(SkPath& path,SkCanvas* canvas,SkColor color,
285 const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join,
286 SkPaint::Style style, SkPath::FillType fill,
287 SkScalar strokeWidth) {
288 path.setFillType(fill);
289 SkPaint paint;
290 paint.setStrokeCap(cap);
291 paint.setStrokeWidth(strokeWidth);
292 paint.setStrokeJoin(join);
293 paint.setColor(color);
294 paint.setStyle(style);
295 canvas->save();
296 canvas->clipRect(clip);
297 canvas->drawPath(path, paint);
298 canvas->restore();
299 }
rmistry@google.comd6176b02012-08-23 18:14:13 +0000300
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000301 virtual void onDraw(SkCanvas* canvas) {
302 struct FillAndName {
303 SkPath::FillType fFill;
304 const char* fName;
305 };
mtkleindbfd7ab2016-09-01 11:24:54 -0700306 constexpr FillAndName gFills[] = {
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000307 {SkPath::kWinding_FillType, "Winding"},
308 {SkPath::kEvenOdd_FillType, "Even / Odd"},
309 {SkPath::kInverseWinding_FillType, "Inverse Winding"},
310 {SkPath::kInverseEvenOdd_FillType, "Inverse Even / Odd"},
311 };
312 struct StyleAndName {
313 SkPaint::Style fStyle;
314 const char* fName;
315 };
mtkleindbfd7ab2016-09-01 11:24:54 -0700316 constexpr StyleAndName gStyles[] = {
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000317 {SkPaint::kFill_Style, "Fill"},
318 {SkPaint::kStroke_Style, "Stroke"},
319 {SkPaint::kStrokeAndFill_Style, "Stroke And Fill"},
320 };
321 struct CapAndName {
322 SkPaint::Cap fCap;
323 SkPaint::Join fJoin;
324 const char* fName;
325 };
mtkleindbfd7ab2016-09-01 11:24:54 -0700326 constexpr CapAndName gCaps[] = {
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000327 {SkPaint::kButt_Cap, SkPaint::kBevel_Join, "Butt"},
328 {SkPaint::kRound_Cap, SkPaint::kRound_Join, "Round"},
329 {SkPaint::kSquare_Cap, SkPaint::kBevel_Join, "Square"}
330 };
331 struct PathAndName {
332 SkPath fPath;
333 const char* fName;
334 };
335 PathAndName path;
336 path.fPath.moveTo(25*SK_Scalar1, 10*SK_Scalar1);
337 path.fPath.cubicTo(40*SK_Scalar1, 20*SK_Scalar1,
338 60*SK_Scalar1, 20*SK_Scalar1,
339 75*SK_Scalar1, 10*SK_Scalar1);
340 path.fPath.close();
341 path.fName = "moveTo-cubic-close";
342
343 SkPaint titlePaint;
344 titlePaint.setColor(SK_ColorBLACK);
345 titlePaint.setAntiAlias(true);
caryclark1818acb2015-07-24 12:09:25 -0700346 sk_tool_utils::set_portable_typeface(&titlePaint);
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000347 titlePaint.setTextSize(15 * SK_Scalar1);
348 const char title[] = "Cubic Closed Drawn Into Rectangle Clips With "
349 "Indicated Style, Fill and Linecaps, with stroke width 10";
350 canvas->drawText(title, strlen(title),
351 20 * SK_Scalar1,
352 20 * SK_Scalar1,
353 titlePaint);
354
scroggof9d61012014-12-15 12:54:51 -0800355 SkRandom rand;
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000356 SkRect rect = SkRect::MakeWH(100*SK_Scalar1, 30*SK_Scalar1);
357 canvas->save();
358 canvas->translate(10 * SK_Scalar1, 30 * SK_Scalar1);
359 canvas->save();
360 for (size_t cap = 0; cap < SK_ARRAY_COUNT(gCaps); ++cap) {
361 if (0 < cap) {
362 canvas->translate((rect.width() + 40 * SK_Scalar1) * SK_ARRAY_COUNT(gStyles), 0);
363 }
364 canvas->save();
365 for (size_t fill = 0; fill < SK_ARRAY_COUNT(gFills); ++fill) {
366 if (0 < fill) {
367 canvas->translate(0, rect.height() + 40 * SK_Scalar1);
368 }
369 canvas->save();
370 for (size_t style = 0; style < SK_ARRAY_COUNT(gStyles); ++style) {
371 if (0 < style) {
372 canvas->translate(rect.width() + 40 * SK_Scalar1, 0);
373 }
rmistry@google.comd6176b02012-08-23 18:14:13 +0000374
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000375 SkColor color = 0xff007000;
376 this->drawPath(path.fPath, canvas, color, rect,
377 gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle,
378 gFills[fill].fFill, SK_Scalar1*10);
rmistry@google.comd6176b02012-08-23 18:14:13 +0000379
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000380 SkPaint rectPaint;
381 rectPaint.setColor(SK_ColorBLACK);
382 rectPaint.setStyle(SkPaint::kStroke_Style);
383 rectPaint.setStrokeWidth(-1);
384 rectPaint.setAntiAlias(true);
385 canvas->drawRect(rect, rectPaint);
rmistry@google.comd6176b02012-08-23 18:14:13 +0000386
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000387 SkPaint labelPaint;
388 labelPaint.setColor(color);
389 labelPaint.setAntiAlias(true);
caryclark1818acb2015-07-24 12:09:25 -0700390 sk_tool_utils::set_portable_typeface(&labelPaint);
schenney@chromium.org45cbfdd2011-12-20 21:48:14 +0000391 labelPaint.setTextSize(10 * SK_Scalar1);
392 canvas->drawText(gStyles[style].fName,
393 strlen(gStyles[style].fName),
394 0, rect.height() + 12 * SK_Scalar1,
395 labelPaint);
396 canvas->drawText(gFills[fill].fName,
397 strlen(gFills[fill].fName),
398 0, rect.height() + 24 * SK_Scalar1,
399 labelPaint);
400 canvas->drawText(gCaps[cap].fName,
401 strlen(gCaps[cap].fName),
402 0, rect.height() + 36 * SK_Scalar1,
403 labelPaint);
schenney@chromium.org4da06ab2011-12-20 15:14:18 +0000404 }
405 canvas->restore();
406 }
407 canvas->restore();
408 }
409 canvas->restore();
410 canvas->restore();
411 }
rmistry@google.comd6176b02012-08-23 18:14:13 +0000412
schenney@chromium.org4da06ab2011-12-20 15:14:18 +0000413private:
reed@google.com27b90fa2013-03-08 18:44:01 +0000414 typedef skiagm::GM INHERITED;
schenney@chromium.org4da06ab2011-12-20 15:14:18 +0000415};
416
caryclark4693a172016-04-06 08:54:06 -0700417DEF_SIMPLE_GM(bug5099, canvas, 50, 50) {
418 SkPaint p;
419 p.setColor(SK_ColorRED);
420 p.setAntiAlias(true);
421 p.setStyle(SkPaint::kStroke_Style);
422 p.setStrokeWidth(10);
423
424 SkPath path;
425 path.moveTo(6, 27);
426 path.cubicTo(31.5f, 1.5f, 3.5f, 4.5f, 29, 29);
427 canvas->drawPath(path, p);
428}
429
Cary Clarkd4631982017-01-05 12:08:38 -0500430DEF_SIMPLE_GM(bug6083, canvas, 100, 50) {
431 SkPaint p;
432 p.setColor(SK_ColorRED);
433 p.setAntiAlias(true);
434 p.setStyle(SkPaint::kStroke_Style);
435 p.setStrokeWidth(15);
436 canvas->translate(-500, -130);
437 SkPath path;
438 path.moveTo(500.988f, 155.200f);
439 path.lineTo(526.109f, 155.200f);
440 SkPoint p1 = { 526.109f, 155.200f };
441 SkPoint p2 = { 525.968f, 212.968f };
442 SkPoint p3 = { 526.109f, 241.840f };
443 path.cubicTo(p1, p2, p3);
444 canvas->drawPath(path, p);
445 canvas->translate(50, 0);
446 path.reset();
447 p2.set(525.968f, 213.172f);
448 path.moveTo(500.988f, 155.200f);
449 path.lineTo(526.109f, 155.200f);
450 path.cubicTo(p1, p2, p3);
451 canvas->drawPath(path, p);
452}
453
schenney@chromium.org4da06ab2011-12-20 15:14:18 +0000454//////////////////////////////////////////////////////////////////////////////
455
reed@google.com27b90fa2013-03-08 18:44:01 +0000456DEF_GM( return new CubicPathGM; )
457DEF_GM( return new CubicClosePathGM; )
reed@google.com22999c62013-05-23 19:30:48 +0000458DEF_GM( return new ClippedCubicGM; )
caryclark7d173402015-08-20 08:23:52 -0700459DEF_GM( return new ClippedCubic2GM; )