39 { bounds.left(), bounds.top() },
40 { bounds.right(), bounds.bottom() },
67 p.setAntiAlias(
false);
69 p.setShader(fCheckerboard);
125 backgroundPaint.
setColor(backgroundColor);
128 for (
size_t m = 0; m < std::size(
gModes); m++) {
130 paint.setColor(textColor);
133 font.setSubpixel(
true);
154DEF_GM(
return new LcdBlendGM; )
static sk_sp< SkShader > make_shader()
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
SK_API const char * SkBlendMode_Name(SkBlendMode blendMode)
@ kExclusion
rc = s + d - two(s*d), ra = kSrcOver
@ kSaturation
saturation of source with hue and luminosity of destination
@ kColorBurn
darken destination to reflect source
@ kLighten
rc = s + d - min(s*da, d*sa), ra = kSrcOver
@ kHue
hue of source with saturation and luminosity of destination
@ kMultiply
r = s*(1-da) + d*(1-sa) + s*d
@ kColorDodge
brighten destination to reflect source
@ kSrcOver
r = s + (1-sa)*d
@ kXor
r = s*(1-da) + d*(1-sa)
@ kLuminosity
luminosity of source with hue and saturation of destination
@ kSoftLight
lighten or darken, depending on source
@ kDifference
rc = s + d - 2*(min(s*da, d*sa)), ra = kSrcOver
@ kOverlay
multiply or screen, depending on destination
@ kSrcATop
r = s*da + d*(1-sa)
@ kDstATop
r = d*sa + s*(1-da)
@ kDstOver
r = d + (1-da)*s
@ kColor
hue and saturation of source with luminosity of destination
@ kHardLight
multiply or screen, depending on source
@ kDarken
rc = s + d - max(s*da, d*sa), ra = kSrcOver
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
constexpr SkBlendMode gModes[]
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
@ kSubpixelAntiAlias
glyph positioned in pixel using transparency
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)
void setColor(SkColor color)
@ kFill_Style
set to fill geometry
void setBlendMode(SkBlendMode mode)
SkString getName() const override
void onDraw(SkCanvas *canvas) override
void drawColumn(SkCanvas *canvas, SkColor backgroundColor, SkColor textColor, bool useGrad)
void onOnceBeforeDraw() override
SkISize getISize() override
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
void setXYWH(float x, float y, float width, float height)
static SkRect MakeIWH(int w, int h)
static constexpr SkRect MakeWH(float w, float h)