4 {
10 for (auto dither : { false, true } ) {
12 for (
auto colors : { 0xFF333333, 0xFF666666, 0xFF999999, 0xFFCCCCCC } ) {
13 for (auto mask : { 0xFFFF0000, 0xFF00FF00, 0xFF0000FF, 0xFFFFFFFF } ) {
15 c16.drawRect({0, 0, 8, 4}, colorPaint);
16 c16.translate(8, 0);
17 }
18 c16.translate(-32, 4);
19 }
20 }
23}
24}
@ 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)
PODArray< SkColor > colors
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)