4 {
6 constexpr int width = 4;
9 0xFF000000, 0xFF005500, 0xFF00AA00, 0xFF00FF00,
10 0xFF000055, 0xFF005555, 0xFF00AA55, 0xFF00FF55,
11 0xFF0000AA, 0xFF0055AA, 0xFF00AAAA, 0xFF00FFAA,
12 0xFF0000FF, 0xFF0055FF, 0xFF00AAFF, 0xFF00FFFF,
13 };
15 pixels,
sizeof(uint32_t) *
width);
17
18 canvas->
scale(16, 16);
20}
21}
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void scale(SkScalar sx, SkScalar sy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
SK_API sk_sp< SkImage > RasterFromPixmapCopy(const SkPixmap &pixmap)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)