5 {
10 SkColor gradColors[] = { 0xFFAA3300, 0x7F881122 };
11 SkPoint gradPoints[] = { { 0, 0 }, { 256, 0 } };
16 bitmap.allocPixels(srcInfo);
21 std::vector<int16_t> dstPixels;
23 bitmap.readPixels(dstInfo, &dstPixels.front(),
width * 2, 0, 0);
25 bitmap.installPixels(dstPixmap);
27}
28}
@ kARGB_4444_SkColorType
pixel with 4 bits for alpha, red, green, blue; in 16-bit word
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static SkImageInfo MakeN32Premul(int width, int height)
SkImageInfo makeColorType(SkColorType newColorType) const
static constexpr SkRect MakeWH(float w, float h)