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

Go to the source code of this file.

Functions

 REG_FIDDLE (redwhiteonblue, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( redwhiteonblue  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file redwhiteonblue.cpp.

4 {
5void draw(SkCanvas* canvas) {
6 canvas->clear(SK_ColorBLUE);
8 paint.setAntiAlias(true);
9 paint.setColor(SK_ColorWHITE);
10 canvas->drawRect({10.5, 10.5, 120.5, 120.5}, paint);
11 paint.setColor(SK_ColorRED);
12 canvas->drawRect({120.5, 10.5, 230.5, 120.5}, paint);
13}
14} // END FIDDLE
constexpr SkColor SK_ColorBLUE
Definition: SkColor.h:135
constexpr SkColor SK_ColorRED
Definition: SkColor.h:126
constexpr SkColor SK_ColorWHITE
Definition: SkColor.h:122
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawRect(const SkRect &rect, const SkPaint &paint)
Definition: SkCanvas.cpp:1673
void clear(SkColor color)
Definition: SkCanvas.h:1199
const Paint & paint
Definition: color_source.cc:38