Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Canvas_drawPoint.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=3476b553e7b547b604a3f6969f02d933
5REG_FIDDLE(Canvas_drawPoint, 256, 256, false, 0) {
6void draw(SkCanvas* canvas) {
8 paint.setAntiAlias(true);
9 paint.setColor(0x80349a45);
11 paint.setStrokeWidth(100);
12 paint.setStrokeCap(SkPaint::kRound_Cap);
13 canvas->scale(1, 1.2f);
14 canvas->drawPoint(64, 96, paint);
15 canvas->scale(.6f, .8f);
16 paint.setColor(SK_ColorWHITE);
17 canvas->drawPoint(106, 120, paint);
18}
19} // END FIDDLE
constexpr SkColor SK_ColorWHITE
Definition SkColor.h:122
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void drawPoint(SkScalar x, SkScalar y, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
@ kRound_Cap
adds circle
Definition SkPaint.h:335
@ 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