schenney@chromium.org | 4da06ab | 2011-12-20 15:14:18 +0000 | [diff] [blame] | 1 | /* |
| 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 | */ |
bungeman | d3ebb48 | 2015-08-05 13:57:49 -0700 | [diff] [blame^] | 7 | |
schenney@chromium.org | 4da06ab | 2011-12-20 15:14:18 +0000 | [diff] [blame] | 8 | #include "gm.h" |
| 9 | #include "SkCanvas.h" |
| 10 | #include "SkPaint.h" |
bungeman | d3ebb48 | 2015-08-05 13:57:49 -0700 | [diff] [blame^] | 11 | #include "SkPath.h" |
schenney@chromium.org | 4da06ab | 2011-12-20 15:14:18 +0000 | [diff] [blame] | 12 | #include "SkRandom.h" |
| 13 | |
reed@google.com | 22999c6 | 2013-05-23 19:30:48 +0000 | [diff] [blame] | 14 | // skbug.com/1316 shows that this cubic, when slightly clipped, creates big |
| 15 | // (incorrect) changes to its control points. |
| 16 | class ClippedCubicGM : public skiagm::GM { |
| 17 | public: |
| 18 | ClippedCubicGM() {} |
skia.committer@gmail.com | 3e2345a | 2013-05-24 07:01:26 +0000 | [diff] [blame] | 19 | |
reed@google.com | 22999c6 | 2013-05-23 19:30:48 +0000 | [diff] [blame] | 20 | protected: |
commit-bot@chromium.org | a90c680 | 2014-04-30 13:20:45 +0000 | [diff] [blame] | 21 | |
reed@google.com | 22999c6 | 2013-05-23 19:30:48 +0000 | [diff] [blame] | 22 | SkString onShortName() { |
reed@google.com | 03ca64b | 2013-05-23 19:39:15 +0000 | [diff] [blame] | 23 | return SkString("clippedcubic"); |
reed@google.com | 22999c6 | 2013-05-23 19:30:48 +0000 | [diff] [blame] | 24 | } |
skia.committer@gmail.com | 3e2345a | 2013-05-24 07:01:26 +0000 | [diff] [blame] | 25 | |
reed@google.com | 22999c6 | 2013-05-23 19:30:48 +0000 | [diff] [blame] | 26 | SkISize onISize() { return SkISize::Make(1240, 390); } |
skia.committer@gmail.com | 3e2345a | 2013-05-24 07:01:26 +0000 | [diff] [blame] | 27 | |
reed@google.com | 22999c6 | 2013-05-23 19:30:48 +0000 | [diff] [blame] | 28 | virtual void onDraw(SkCanvas* canvas) { |
| 29 | SkPath path; |
| 30 | path.moveTo(0, 0); |
| 31 | path.cubicTo(140, 150, 40, 10, 170, 150); |
skia.committer@gmail.com | 3e2345a | 2013-05-24 07:01:26 +0000 | [diff] [blame] | 32 | |
reed@google.com | 22999c6 | 2013-05-23 19:30:48 +0000 | [diff] [blame] | 33 | SkPaint paint; |
| 34 | SkRect bounds = path.getBounds(); |
skia.committer@gmail.com | 3e2345a | 2013-05-24 07:01:26 +0000 | [diff] [blame] | 35 | |
reed@google.com | 0f8990c | 2013-05-23 19:47:05 +0000 | [diff] [blame] | 36 | for (SkScalar dy = -1; dy <= 1; dy += 1) { |
reed@google.com | 22999c6 | 2013-05-23 19:30:48 +0000 | [diff] [blame] | 37 | canvas->save(); |
reed@google.com | 0f8990c | 2013-05-23 19:47:05 +0000 | [diff] [blame] | 38 | for (SkScalar dx = -1; dx <= 1; dx += 1) { |
reed@google.com | 22999c6 | 2013-05-23 19:30:48 +0000 | [diff] [blame] | 39 | canvas->save(); |
| 40 | canvas->clipRect(bounds); |
| 41 | canvas->translate(dx, dy); |
| 42 | canvas->drawPath(path, paint); |
| 43 | canvas->restore(); |
skia.committer@gmail.com | 3e2345a | 2013-05-24 07:01:26 +0000 | [diff] [blame] | 44 | |
reed@google.com | 22999c6 | 2013-05-23 19:30:48 +0000 | [diff] [blame] | 45 | canvas->translate(bounds.width(), 0); |
| 46 | } |
| 47 | canvas->restore(); |
| 48 | canvas->translate(0, bounds.height()); |
| 49 | } |
| 50 | } |
skia.committer@gmail.com | 3e2345a | 2013-05-24 07:01:26 +0000 | [diff] [blame] | 51 | |
reed@google.com | 22999c6 | 2013-05-23 19:30:48 +0000 | [diff] [blame] | 52 | private: |
| 53 | typedef skiagm::GM INHERITED; |
| 54 | }; |
| 55 | |
reed@google.com | 27b90fa | 2013-03-08 18:44:01 +0000 | [diff] [blame] | 56 | class CubicPathGM : public skiagm::GM { |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 57 | public: |
| 58 | CubicPathGM() {} |
| 59 | |
| 60 | protected: |
commit-bot@chromium.org | a90c680 | 2014-04-30 13:20:45 +0000 | [diff] [blame] | 61 | |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 62 | SkString onShortName() { |
| 63 | return SkString("cubicpath"); |
| 64 | } |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 65 | |
reed@google.com | 27b90fa | 2013-03-08 18:44:01 +0000 | [diff] [blame] | 66 | SkISize onISize() { return SkISize::Make(1240, 390); } |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 67 | |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 68 | void drawPath(SkPath& path,SkCanvas* canvas,SkColor color, |
| 69 | const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join, |
| 70 | SkPaint::Style style, SkPath::FillType fill, |
| 71 | SkScalar strokeWidth) { |
| 72 | path.setFillType(fill); |
| 73 | SkPaint paint; |
| 74 | paint.setStrokeCap(cap); |
| 75 | paint.setStrokeWidth(strokeWidth); |
| 76 | paint.setStrokeJoin(join); |
| 77 | paint.setColor(color); |
| 78 | paint.setStyle(style); |
| 79 | canvas->save(); |
| 80 | canvas->clipRect(clip); |
| 81 | canvas->drawPath(path, paint); |
| 82 | canvas->restore(); |
| 83 | } |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 84 | |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 85 | virtual void onDraw(SkCanvas* canvas) { |
| 86 | struct FillAndName { |
| 87 | SkPath::FillType fFill; |
| 88 | const char* fName; |
| 89 | }; |
| 90 | static const FillAndName gFills[] = { |
| 91 | {SkPath::kWinding_FillType, "Winding"}, |
| 92 | {SkPath::kEvenOdd_FillType, "Even / Odd"}, |
| 93 | {SkPath::kInverseWinding_FillType, "Inverse Winding"}, |
| 94 | {SkPath::kInverseEvenOdd_FillType, "Inverse Even / Odd"}, |
| 95 | }; |
| 96 | struct StyleAndName { |
| 97 | SkPaint::Style fStyle; |
| 98 | const char* fName; |
| 99 | }; |
| 100 | static const StyleAndName gStyles[] = { |
| 101 | {SkPaint::kFill_Style, "Fill"}, |
| 102 | {SkPaint::kStroke_Style, "Stroke"}, |
| 103 | {SkPaint::kStrokeAndFill_Style, "Stroke And Fill"}, |
| 104 | }; |
| 105 | struct CapAndName { |
| 106 | SkPaint::Cap fCap; |
| 107 | SkPaint::Join fJoin; |
| 108 | const char* fName; |
| 109 | }; |
| 110 | static const CapAndName gCaps[] = { |
| 111 | {SkPaint::kButt_Cap, SkPaint::kBevel_Join, "Butt"}, |
| 112 | {SkPaint::kRound_Cap, SkPaint::kRound_Join, "Round"}, |
| 113 | {SkPaint::kSquare_Cap, SkPaint::kBevel_Join, "Square"} |
| 114 | }; |
| 115 | struct PathAndName { |
| 116 | SkPath fPath; |
| 117 | const char* fName; |
| 118 | }; |
| 119 | PathAndName path; |
| 120 | path.fPath.moveTo(25*SK_Scalar1, 10*SK_Scalar1); |
| 121 | path.fPath.cubicTo(40*SK_Scalar1, 20*SK_Scalar1, |
| 122 | 60*SK_Scalar1, 20*SK_Scalar1, |
| 123 | 75*SK_Scalar1, 10*SK_Scalar1); |
| 124 | path.fName = "moveTo-cubic"; |
| 125 | |
| 126 | SkPaint titlePaint; |
| 127 | titlePaint.setColor(SK_ColorBLACK); |
| 128 | titlePaint.setAntiAlias(true); |
caryclark | 1818acb | 2015-07-24 12:09:25 -0700 | [diff] [blame] | 129 | sk_tool_utils::set_portable_typeface(&titlePaint); |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 130 | titlePaint.setTextSize(15 * SK_Scalar1); |
| 131 | const char title[] = "Cubic Drawn Into Rectangle Clips With " |
| 132 | "Indicated Style, Fill and Linecaps, with stroke width 10"; |
| 133 | canvas->drawText(title, strlen(title), |
| 134 | 20 * SK_Scalar1, |
| 135 | 20 * SK_Scalar1, |
| 136 | titlePaint); |
| 137 | |
scroggo | f9d6101 | 2014-12-15 12:54:51 -0800 | [diff] [blame] | 138 | SkRandom rand; |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 139 | SkRect rect = SkRect::MakeWH(100*SK_Scalar1, 30*SK_Scalar1); |
| 140 | canvas->save(); |
| 141 | canvas->translate(10 * SK_Scalar1, 30 * SK_Scalar1); |
| 142 | canvas->save(); |
| 143 | for (size_t cap = 0; cap < SK_ARRAY_COUNT(gCaps); ++cap) { |
| 144 | if (0 < cap) { |
| 145 | canvas->translate((rect.width() + 40 * SK_Scalar1) * SK_ARRAY_COUNT(gStyles), 0); |
| 146 | } |
| 147 | canvas->save(); |
| 148 | for (size_t fill = 0; fill < SK_ARRAY_COUNT(gFills); ++fill) { |
| 149 | if (0 < fill) { |
| 150 | canvas->translate(0, rect.height() + 40 * SK_Scalar1); |
| 151 | } |
| 152 | canvas->save(); |
| 153 | for (size_t style = 0; style < SK_ARRAY_COUNT(gStyles); ++style) { |
| 154 | if (0 < style) { |
| 155 | canvas->translate(rect.width() + 40 * SK_Scalar1, 0); |
| 156 | } |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 157 | |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 158 | SkColor color = 0xff007000; |
| 159 | this->drawPath(path.fPath, canvas, color, rect, |
| 160 | gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle, |
| 161 | gFills[fill].fFill, SK_Scalar1*10); |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 162 | |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 163 | SkPaint rectPaint; |
| 164 | rectPaint.setColor(SK_ColorBLACK); |
| 165 | rectPaint.setStyle(SkPaint::kStroke_Style); |
| 166 | rectPaint.setStrokeWidth(-1); |
| 167 | rectPaint.setAntiAlias(true); |
| 168 | canvas->drawRect(rect, rectPaint); |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 169 | |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 170 | SkPaint labelPaint; |
| 171 | labelPaint.setColor(color); |
| 172 | labelPaint.setAntiAlias(true); |
caryclark | 1818acb | 2015-07-24 12:09:25 -0700 | [diff] [blame] | 173 | sk_tool_utils::set_portable_typeface(&labelPaint); |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 174 | labelPaint.setTextSize(10 * SK_Scalar1); |
| 175 | canvas->drawText(gStyles[style].fName, |
| 176 | strlen(gStyles[style].fName), |
| 177 | 0, rect.height() + 12 * SK_Scalar1, |
| 178 | labelPaint); |
| 179 | canvas->drawText(gFills[fill].fName, |
| 180 | strlen(gFills[fill].fName), |
| 181 | 0, rect.height() + 24 * SK_Scalar1, |
| 182 | labelPaint); |
| 183 | canvas->drawText(gCaps[cap].fName, |
| 184 | strlen(gCaps[cap].fName), |
| 185 | 0, rect.height() + 36 * SK_Scalar1, |
| 186 | labelPaint); |
| 187 | } |
| 188 | canvas->restore(); |
| 189 | } |
| 190 | canvas->restore(); |
| 191 | } |
| 192 | canvas->restore(); |
| 193 | canvas->restore(); |
| 194 | } |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 195 | |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 196 | private: |
reed@google.com | 27b90fa | 2013-03-08 18:44:01 +0000 | [diff] [blame] | 197 | typedef skiagm::GM INHERITED; |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 198 | }; |
| 199 | |
reed@google.com | 27b90fa | 2013-03-08 18:44:01 +0000 | [diff] [blame] | 200 | class CubicClosePathGM : public skiagm::GM { |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 201 | public: |
| 202 | CubicClosePathGM() {} |
| 203 | |
| 204 | protected: |
commit-bot@chromium.org | a90c680 | 2014-04-30 13:20:45 +0000 | [diff] [blame] | 205 | |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 206 | SkString onShortName() { |
| 207 | return SkString("cubicclosepath"); |
| 208 | } |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 209 | |
reed@google.com | 27b90fa | 2013-03-08 18:44:01 +0000 | [diff] [blame] | 210 | SkISize onISize() { return SkISize::Make(1240, 390); } |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 211 | |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 212 | void drawPath(SkPath& path,SkCanvas* canvas,SkColor color, |
| 213 | const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join, |
| 214 | SkPaint::Style style, SkPath::FillType fill, |
| 215 | SkScalar strokeWidth) { |
| 216 | path.setFillType(fill); |
| 217 | SkPaint paint; |
| 218 | paint.setStrokeCap(cap); |
| 219 | paint.setStrokeWidth(strokeWidth); |
| 220 | paint.setStrokeJoin(join); |
| 221 | paint.setColor(color); |
| 222 | paint.setStyle(style); |
| 223 | canvas->save(); |
| 224 | canvas->clipRect(clip); |
| 225 | canvas->drawPath(path, paint); |
| 226 | canvas->restore(); |
| 227 | } |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 228 | |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 229 | virtual void onDraw(SkCanvas* canvas) { |
| 230 | struct FillAndName { |
| 231 | SkPath::FillType fFill; |
| 232 | const char* fName; |
| 233 | }; |
| 234 | static const FillAndName gFills[] = { |
| 235 | {SkPath::kWinding_FillType, "Winding"}, |
| 236 | {SkPath::kEvenOdd_FillType, "Even / Odd"}, |
| 237 | {SkPath::kInverseWinding_FillType, "Inverse Winding"}, |
| 238 | {SkPath::kInverseEvenOdd_FillType, "Inverse Even / Odd"}, |
| 239 | }; |
| 240 | struct StyleAndName { |
| 241 | SkPaint::Style fStyle; |
| 242 | const char* fName; |
| 243 | }; |
| 244 | static const StyleAndName gStyles[] = { |
| 245 | {SkPaint::kFill_Style, "Fill"}, |
| 246 | {SkPaint::kStroke_Style, "Stroke"}, |
| 247 | {SkPaint::kStrokeAndFill_Style, "Stroke And Fill"}, |
| 248 | }; |
| 249 | struct CapAndName { |
| 250 | SkPaint::Cap fCap; |
| 251 | SkPaint::Join fJoin; |
| 252 | const char* fName; |
| 253 | }; |
| 254 | static const CapAndName gCaps[] = { |
| 255 | {SkPaint::kButt_Cap, SkPaint::kBevel_Join, "Butt"}, |
| 256 | {SkPaint::kRound_Cap, SkPaint::kRound_Join, "Round"}, |
| 257 | {SkPaint::kSquare_Cap, SkPaint::kBevel_Join, "Square"} |
| 258 | }; |
| 259 | struct PathAndName { |
| 260 | SkPath fPath; |
| 261 | const char* fName; |
| 262 | }; |
| 263 | PathAndName path; |
| 264 | path.fPath.moveTo(25*SK_Scalar1, 10*SK_Scalar1); |
| 265 | path.fPath.cubicTo(40*SK_Scalar1, 20*SK_Scalar1, |
| 266 | 60*SK_Scalar1, 20*SK_Scalar1, |
| 267 | 75*SK_Scalar1, 10*SK_Scalar1); |
| 268 | path.fPath.close(); |
| 269 | path.fName = "moveTo-cubic-close"; |
| 270 | |
| 271 | SkPaint titlePaint; |
| 272 | titlePaint.setColor(SK_ColorBLACK); |
| 273 | titlePaint.setAntiAlias(true); |
caryclark | 1818acb | 2015-07-24 12:09:25 -0700 | [diff] [blame] | 274 | sk_tool_utils::set_portable_typeface(&titlePaint); |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 275 | titlePaint.setTextSize(15 * SK_Scalar1); |
| 276 | const char title[] = "Cubic Closed Drawn Into Rectangle Clips With " |
| 277 | "Indicated Style, Fill and Linecaps, with stroke width 10"; |
| 278 | canvas->drawText(title, strlen(title), |
| 279 | 20 * SK_Scalar1, |
| 280 | 20 * SK_Scalar1, |
| 281 | titlePaint); |
| 282 | |
scroggo | f9d6101 | 2014-12-15 12:54:51 -0800 | [diff] [blame] | 283 | SkRandom rand; |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 284 | SkRect rect = SkRect::MakeWH(100*SK_Scalar1, 30*SK_Scalar1); |
| 285 | canvas->save(); |
| 286 | canvas->translate(10 * SK_Scalar1, 30 * SK_Scalar1); |
| 287 | canvas->save(); |
| 288 | for (size_t cap = 0; cap < SK_ARRAY_COUNT(gCaps); ++cap) { |
| 289 | if (0 < cap) { |
| 290 | canvas->translate((rect.width() + 40 * SK_Scalar1) * SK_ARRAY_COUNT(gStyles), 0); |
| 291 | } |
| 292 | canvas->save(); |
| 293 | for (size_t fill = 0; fill < SK_ARRAY_COUNT(gFills); ++fill) { |
| 294 | if (0 < fill) { |
| 295 | canvas->translate(0, rect.height() + 40 * SK_Scalar1); |
| 296 | } |
| 297 | canvas->save(); |
| 298 | for (size_t style = 0; style < SK_ARRAY_COUNT(gStyles); ++style) { |
| 299 | if (0 < style) { |
| 300 | canvas->translate(rect.width() + 40 * SK_Scalar1, 0); |
| 301 | } |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 302 | |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 303 | SkColor color = 0xff007000; |
| 304 | this->drawPath(path.fPath, canvas, color, rect, |
| 305 | gCaps[cap].fCap, gCaps[cap].fJoin, gStyles[style].fStyle, |
| 306 | gFills[fill].fFill, SK_Scalar1*10); |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 307 | |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 308 | SkPaint rectPaint; |
| 309 | rectPaint.setColor(SK_ColorBLACK); |
| 310 | rectPaint.setStyle(SkPaint::kStroke_Style); |
| 311 | rectPaint.setStrokeWidth(-1); |
| 312 | rectPaint.setAntiAlias(true); |
| 313 | canvas->drawRect(rect, rectPaint); |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 314 | |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 315 | SkPaint labelPaint; |
| 316 | labelPaint.setColor(color); |
| 317 | labelPaint.setAntiAlias(true); |
caryclark | 1818acb | 2015-07-24 12:09:25 -0700 | [diff] [blame] | 318 | sk_tool_utils::set_portable_typeface(&labelPaint); |
schenney@chromium.org | 45cbfdd | 2011-12-20 21:48:14 +0000 | [diff] [blame] | 319 | labelPaint.setTextSize(10 * SK_Scalar1); |
| 320 | canvas->drawText(gStyles[style].fName, |
| 321 | strlen(gStyles[style].fName), |
| 322 | 0, rect.height() + 12 * SK_Scalar1, |
| 323 | labelPaint); |
| 324 | canvas->drawText(gFills[fill].fName, |
| 325 | strlen(gFills[fill].fName), |
| 326 | 0, rect.height() + 24 * SK_Scalar1, |
| 327 | labelPaint); |
| 328 | canvas->drawText(gCaps[cap].fName, |
| 329 | strlen(gCaps[cap].fName), |
| 330 | 0, rect.height() + 36 * SK_Scalar1, |
| 331 | labelPaint); |
schenney@chromium.org | 4da06ab | 2011-12-20 15:14:18 +0000 | [diff] [blame] | 332 | } |
| 333 | canvas->restore(); |
| 334 | } |
| 335 | canvas->restore(); |
| 336 | } |
| 337 | canvas->restore(); |
| 338 | canvas->restore(); |
| 339 | } |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 340 | |
schenney@chromium.org | 4da06ab | 2011-12-20 15:14:18 +0000 | [diff] [blame] | 341 | private: |
reed@google.com | 27b90fa | 2013-03-08 18:44:01 +0000 | [diff] [blame] | 342 | typedef skiagm::GM INHERITED; |
schenney@chromium.org | 4da06ab | 2011-12-20 15:14:18 +0000 | [diff] [blame] | 343 | }; |
| 344 | |
| 345 | ////////////////////////////////////////////////////////////////////////////// |
| 346 | |
reed@google.com | 27b90fa | 2013-03-08 18:44:01 +0000 | [diff] [blame] | 347 | DEF_GM( return new CubicPathGM; ) |
| 348 | DEF_GM( return new CubicClosePathGM; ) |
reed@google.com | 22999c6 | 2013-05-23 19:30:48 +0000 | [diff] [blame] | 349 | DEF_GM( return new ClippedCubicGM; ) |