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(Paint_057, 462, 256, false, 0) {
draw(SkCanvas * canvas)5 void draw(SkCanvas* canvas) {
6 SkPath path;
7 path.moveTo(10, 50);
8 path.quadTo(35, 110, 60, 210);
9 path.quadTo(105, 110, 130, 10);
10 SkPaint paint; // set to default kMiter_Join
11 paint.setAntiAlias(true);
12 paint.setStyle(SkPaint::kStroke_Style);
13 paint.setStrokeWidth(20);
14 canvas->drawPath(path, paint);
15 canvas->translate(150, 0);
16 paint.setStrokeJoin(SkPaint::kBevel_Join);
17 canvas->drawPath(path, paint);
18 canvas->translate(150, 0);
19 paint.setStrokeJoin(SkPaint::kRound_Join);
20 canvas->drawPath(path, paint);
21 }
22 } // END FIDDLE
23