Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 5 of file Paint_setARGB.cpp.

5 {
6void draw(SkCanvas* canvas) {
7 SkPaint transRed1, transRed2;
8 transRed1.setARGB(255 / 2, 255, 0, 0);
9 transRed2.setColor(SkColorSetARGB(255 / 2, 255, 0, 0));
10 SkDebugf("transRed1 %c= transRed2", transRed1 == transRed2 ? '=' : '!');
11}
12} // 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