Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 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. |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 3 | #include "tools/fiddle/examples.h" |
Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 4 | // HASH=3b1aebacc21c1836a52876b9b0b3905e |
| 5 | REG_FIDDLE(Paint_057, 462, 256, false, 0) { |
| 6 | void 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 |