Flutter Engine
The Flutter Engine
Functions
Canvas_drawPoint_2.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (Canvas_drawPoint_2, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Canvas_drawPoint_2  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file Canvas_drawPoint_2.cpp.

4 {
5void draw(SkCanvas* canvas) {
7 paint.setAntiAlias(true);
8 paint.setColor(0x80349a45);
10 paint.setStrokeWidth(100);
11 paint.setStrokeCap(SkPaint::kSquare_Cap);
12 canvas->scale(1, 1.2f);
13 canvas->drawPoint({64, 96}, paint);
14 canvas->scale(.6f, .8f);
15 paint.setColor(SK_ColorWHITE);
16 canvas->drawPoint(106, 120, paint);
17}
18} // 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)
Definition: SkCanvas.cpp:2695
void scale(SkScalar sx, SkScalar sy)
Definition: SkCanvas.cpp:1289
@ kSquare_Cap
adds square
Definition: SkPaint.h:336
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
const Paint & paint
Definition: color_source.cc:38