• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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(bezier_curves, 256, 256, false, 5) {
draw(SkCanvas * canvas)5 void 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
22