blob: b6fc8d6e4648fad6602018f0bc19b17c7f819e78 [file] [log] [blame]
Hal Canary87515122019-03-15 14:22:51 -04001// 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.
Mike Kleinc0bd9f92019-04-23 12:05:21 -05003#include "tools/fiddle/examples.h"
Hal Canary87515122019-03-15 14:22:51 -04004// HASH=2bffb6384cc20077e632e7d01da045ca
5REG_FIDDLE(Paint_053, 256, 200, false, 0) {
6void draw(SkCanvas* canvas) {
7 SkPaint paint;
8 paint.setStyle(SkPaint::kStroke_Style);
9 paint.setStrokeWidth(20);
10 SkPath path;
11 path.moveTo(30, 30);
12 path.lineTo(30, 30);
13 path.moveTo(70, 30);
14 path.lineTo(90, 40);
15 for (SkPaint::Cap c : { SkPaint::kButt_Cap, SkPaint::kRound_Cap, SkPaint::kSquare_Cap } ) {
16 paint.setStrokeCap(c);
17 canvas->drawPath(path, paint);
18 canvas->translate(0, 70);
19 }
20}
21} // END FIDDLE