Go to the source code of this file.
◆ REG_FIDDLE()
REG_FIDDLE |
( |
Pixmap_computeIsOpaque |
, |
|
|
256 |
, |
|
|
256 |
, |
|
|
true |
, |
|
|
0 |
|
|
) |
| |
Definition at line 4 of file Pixmap_computeIsOpaque.cpp.
4 {
6 std::vector<uint32_t> pixels;
12 for (int index = 0; index < 2; ++index) {
13 pixmap.erase(0x00000000);
14 SkDebugf(
"computeIsOpaque: %s\n", pixmap.computeIsOpaque() ?
"true" :
"false");
15 pixmap.erase(0xFFFFFFFF);
16 SkDebugf(
"computeIsOpaque: %s\n", pixmap.computeIsOpaque() ?
"true" :
"false");
18 (
const void*) &pixels.front(),
width * 4);
19 }
20}
21}
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)