Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Paint_setStrokeCap_b.cpp
Go to the documentation of this file.
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.
4// HASH=917c44b504d3f9308571fd3835d90a0d
5REG_FIDDLE(Paint_setStrokeCap_b, 256, 200, false, 0) {
6void draw(SkCanvas* canvas) {
9 paint.setStrokeWidth(20);
10 SkPath path;
11 path.moveTo(30, 20);
12 path.lineTo(40, 40);
13 path.conicTo(70, 20, 100, 20, .707f);
15 paint.setStrokeJoin(j);
16 canvas->drawPath(path, paint);
17 canvas->translate(0, 70);
18 }
19}
20} // END FIDDLE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void translate(SkScalar dx, SkScalar dy)
void drawPath(const SkPath &path, const SkPaint &paint)
@ kStroke_Style
set to stroke geometry
Definition SkPaint.h:194
@ kRound_Join
adds circle
Definition SkPaint.h:360
@ kMiter_Join
extends to miter limit
Definition SkPaint.h:359
@ kBevel_Join
connects outside edges
Definition SkPaint.h:361
const Paint & paint
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60