1 // Copyright 2020 Google LLC.
2 // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3 #include "tools/fiddle/examples.h"
4 REG_FIDDLE(skpaint_path_1d_path_effect, 256, 256, false, 0) {
draw(SkCanvas * canvas)5 void draw(SkCanvas* canvas) {
6     SkPaint paint;
7     SkPath path;
8     path.addOval(SkRect::MakeWH(16.0f, 6.0f));
9     paint.setPathEffect(
10             SkPath1DPathEffect::Make(path, 32.0f, 0.0f, SkPath1DPathEffect::kRotate_Style));
11     paint.setAntiAlias(true);
12     canvas->clear(SK_ColorWHITE);
13     canvas->drawCircle(128.0f, 128.0f, 122.0f, paint);
14 }
15 }  // END FIDDLE
16