4 {
6 uint8_t pixels[][12] = { { 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00},
7 { 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
8 { 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
9 { 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF},
10 { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
11 { 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00},
12 { 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00},
13 { 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00} };
16 bitmap.installPixels(imageInfo, (
void*) pixels,
sizeof(pixels[0]));
25 bitmap.installPixels(imageInfo, (
void*) pixels,
sizeof(pixels[0]));
28}
29}
constexpr SkColor SK_ColorRED
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
size_t computeOffset(int x, int y, size_t rowBytes) const
static SkImageInfo MakeA8(int width, int height)
static constexpr SkRect MakeWH(float w, float h)