1 // Copyright 2019 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(Path_rConicTo, 256, 140, false, 0) {
draw(SkCanvas * canvas)5 void draw(SkCanvas* canvas) {
6 SkPaint paint;
7 paint.setAntiAlias(true);
8 paint.setStyle(SkPaint::kStroke_Style);
9 SkPath path;
10 path.moveTo(20, 80);
11 path.rConicTo( 60, 0, 60, 60, 0.707107f);
12 path.rConicTo( 0, -60, 60, -60, 0.707107f);
13 path.rConicTo(-60, 0, -60, -60, 0.707107f);
14 path.rConicTo( 0, 60, -60, 60, 0.707107f);
15 canvas->drawPath(path, paint);
16 }
17 } // END FIDDLE
18