blob: b80285217d15a15a30171ff3cfc78407cb126d29 [file] [log] [blame]
Hal Canary6c8422c2020-01-10 15:22:09 -05001// 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"
4REG_FIDDLE(skpaint_path_1d_path_effect, 256, 256, false, 0) {
5void 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