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);
REG_FIDDLE(Dither_a, 256, 256, false, 0)
@ 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 drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
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)