5 {
11 for (auto dither : { false, true } ) {
13 for (auto colors : { 0xFF333333, 0xFF666666, 0xFF999999, 0xFFCCCCCC } ) {
14 for (auto mask : { 0xFFFF0000, 0xFF00FF00, 0xFF0000FF, 0xFFFFFFFF } ) {
16 c16.drawRect({0, 0, 8, 4}, colorPaint);
17 c16.translate(8, 0);
18 }
19 c16.translate(-32, 4);
20 }
21 }
24}
25}
@ kOpaque_SkAlphaType
pixel is opaque
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void allocPixels(const SkImageInfo &info, size_t rowBytes)
sk_sp< SkImage > asImage() const
void scale(SkScalar sx, SkScalar sy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
void setColor(SkColor color)
void setDither(bool dither)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)