blob: d7ede5e59e9436049f943c46e8748c58e705f2cf [file] [log] [blame]
Hal Canary83c2f702019-03-07 14:53:03 -05001// 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 "fiddle/examples.h"
4// HASH=3b1aebacc21c1836a52876b9b0b3905e
5REG_FIDDLE(Paint_057, 462, 256, false, 0) {
6void draw(SkCanvas* canvas) {
7 SkPath path;
8 path.moveTo(10, 50);
9 path.quadTo(35, 110, 60, 210);
10 path.quadTo(105, 110, 130, 10);
11 SkPaint paint; // set to default kMiter_Join
12 paint.setAntiAlias(true);
13 paint.setStyle(SkPaint::kStroke_Style);
14 paint.setStrokeWidth(20);
15 canvas->drawPath(path, paint);
16 canvas->translate(150, 0);
17 paint.setStrokeJoin(SkPaint::kBevel_Join);
18 canvas->drawPath(path, paint);
19 canvas->translate(150, 0);
20 paint.setStrokeJoin(SkPaint::kRound_Join);
21 canvas->drawPath(path, paint);
22}
23} // END FIDDLE