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

Go to the source code of this file.

Functions

 REG_FIDDLE (Color_Methods, 256, 128, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Color_Methods  ,
256  ,
128  ,
false  ,
 
)

Definition at line 4 of file Color_Methods.cpp.

4 {
5void draw(SkCanvas* canvas) {
7 paint.setColor(0x8000FF00); // transparent green
8 canvas->drawCircle(50, 50, 40, paint);
9 paint.setARGB(128, 255, 0, 0); // transparent red
10 canvas->drawCircle(80, 50, 40, paint);
11 paint.setColor(SK_ColorBLUE);
12 paint.setAlpha(0x80);
13 canvas->drawCircle(65, 65, 40, paint);
14}
15} // END FIDDLE
constexpr SkColor SK_ColorBLUE
Definition: SkColor.h:135
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
Definition: SkCanvas.cpp:2707
const Paint & paint
Definition: color_source.cc:38