Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
default2.cpp
Go to the documentation of this file.
1// Copyright 2020 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4REG_FIDDLE(default2, 256, 256, false, 0) {
5void draw(SkCanvas* canvas) {
6 SkPaint p;
7 p.setColor(SK_ColorRED);
8 p.setAntiAlias(true);
9 p.setStyle(SkPaint::kStroke_Style);
10 p.setStrokeWidth(10);
11
12 canvas->drawLine(20, 20, 100, 100, p);
13}
14} // END FIDDLE
constexpr SkColor SK_ColorRED
Definition SkColor.h:126
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
@ kStroke_Style
set to stroke geometry
Definition SkPaint.h:194
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60