Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Paint_053.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=2bffb6384cc20077e632e7d01da045ca
5REG_FIDDLE(Paint_053, 256, 200, false, 0) {
6void draw(SkCanvas* canvas) {
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);
16 paint.setStrokeCap(c);
17 canvas->drawPath(path, paint);
18 canvas->translate(0, 70);
19 }
20}
21} // 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)
@ kRound_Cap
adds circle
Definition SkPaint.h:335
@ kButt_Cap
no stroke extension
Definition SkPaint.h:334
@ kSquare_Cap
adds square
Definition SkPaint.h:336
@ kStroke_Style
set to stroke geometry
Definition SkPaint.h:194
const Paint & paint
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60