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

Go to the source code of this file.

Functions

 REG_FIDDLE (Paint_setARGB, 256, 256, true, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Paint_setARGB  ,
256  ,
256  ,
true  ,
 
)

Definition at line 4 of file Paint_setARGB.cpp.

4 {
5void draw(SkCanvas* canvas) {
6 SkPaint transRed1, transRed2;
7 transRed1.setARGB(255 / 2, 255, 0, 0);
8 transRed2.setColor(SkColorSetARGB(255 / 2, 255, 0, 0));
9 SkDebugf("transRed1 %c= transRed2", transRed1 == transRed2 ? '=' : '!');
10}
11} // END FIDDLE
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
Definition: SkColor.h:49
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void setColor(SkColor color)
Definition: SkPaint.cpp:119
void setARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
Definition: SkPaint.cpp:134