Go to the source code of this file.
◆ REG_FIDDLE()
REG_FIDDLE |
( |
Pixmap_getColor |
, |
|
|
256 |
, |
|
|
256 |
, |
|
|
true |
, |
|
|
0 |
|
|
) |
| |
Definition at line 4 of file Pixmap_getColor.cpp.
4 {
8 std::vector<SkPMColor> storage;
11 for (
int y = 0;
y <
h; ++
y) {
13 for (
int x = 0;
x <
w; ++
x) {
14 int a = 0xFF * (
x +
y) / (
w - 1 +
h - 1);
16 SkDebugf(
"0x%08x%c", storage[
x +
y *
w],
x ==
w - 1 ?
'\n' :
' ');
17 }
18 }
21 for (
int y = 0;
y <
h; ++
y) {
23 for (
int x = 0;
x <
w; ++
x) {
24 SkDebugf(
"0x%08x%c", pixmap.getColor(
x,
y),
x ==
w - 1 ?
'\n' :
' ');
25 }
26 }
27}
28}
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
static SkPMColor SkPackARGB32(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
static SkImageInfo MakeN32(int width, int height, SkAlphaType at)