Go to the source code of this file.
|
| REG_FIDDLE (Canvas_writePixels, 256, 256, false, 0) |
|
◆ REG_FIDDLE()
REG_FIDDLE |
( |
Canvas_writePixels |
, |
|
|
256 |
, |
|
|
256 |
, |
|
|
false |
, |
|
|
0 |
|
|
) |
| |
Definition at line 4 of file Canvas_writePixels.cpp.
4 {
7 for (
int y = 0;
y < 256; ++
y) {
8 uint32_t pixels[256];
9 for (
int x = 0;
x < 256; ++
x) {
11 }
12 canvas->
writePixels(imageInfo, &pixels,
sizeof(pixels), 0,
y);
13 }
14}
15}
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
bool writePixels(const SkImageInfo &info, const void *pixels, size_t rowBytes, int x, int y)
static SkImageInfo MakeN32(int width, int height, SkAlphaType at)