blob: d0f9248b081c6c8ea4a5f32a779bfd2359e49025 [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(bezier_curves, 256, 256, false, 5) {
5void draw(SkCanvas* canvas) {
6 canvas->drawColor(SK_ColorWHITE);
7
8 SkPaint paint;
9 paint.setStyle(SkPaint::kStroke_Style);
10 paint.setStrokeWidth(8);
11 paint.setColor(0xff4285F4);
12 paint.setAntiAlias(true);
13 paint.setStrokeCap(SkPaint::kRound_Cap);
14
15 SkPath path;
16 path.moveTo(10, 10);
17 path.quadTo(256, 64, 128, 128);
18 path.quadTo(10, 192, 250, 250);
19 canvas->drawPath(path, paint);
20}
21} // END FIDDLE