4 {
6 uint8_t storage[][5] = {{ 0, 0, 64, 0, 0},
7 { 0, 128, 255, 128, 0},
8 {64, 255, 255, 255, 64},
9 { 0, 128, 255, 128, 0},
10 { 0, 0, 64, 0, 0}};
12 SkPixmap pixmap(imageInfo, storage[0], 5);
14 bitmap.installPixels(pixmap);
15 canvas->
scale(10, 10);
17 *pixmap.writable_addr8(2, 2) = 0;
18
20}
21}
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
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)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)