Debian Codegraph @

docs/examples/skpaint_path_1d_path_effect.cpp

raw
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) {
5 void draw(SkCanvas* canvas) {
6 SkPaint paint;
7 SkPath path = SkPath::Oval(SkRect::MakeWH(16.0f, 6.0f));
8 paint.setPathEffect(
9 SkPath1DPathEffect::Make(path, 32.0f, 0.0f, SkPath1DPathEffect::kRotate_Style));
10 paint.setAntiAlias(true);
11 canvas->clear(SK_ColorWHITE);
12 canvas->drawCircle(128.0f, 128.0f, 122.0f, paint);
13 }
14 } // END FIDDLE