54 srcPoints, srcColors,
nullptr, 2,
65 dstPoints, dstColors,
nullptr, 2,
68 size_t N =
sizeof(modes) /
sizeof(modes[0]);
69 size_t K = (
N - 1) / 3 + 1;
71 for (
size_t i = 0;
i <
N; ++
i) {
78 (void)canvas->
saveLayer(
nullptr,
nullptr);
81 src.setBlendMode(modes[
i]);
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_ColorLTGRAY
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorTRANSPARENT
constexpr SkColor SK_ColorWHITE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
void drawPaint(const SkPaint &paint)
void clear(SkColor color)
void drawTextBlob(const SkTextBlob *blob, SkScalar x, SkScalar y, const SkPaint &paint)
sk_sp< SkTypeface > matchFamilyStyle(const char familyName[], const SkFontStyle &) const
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)
@ kStroke_Style
set to stroke geometry
static sk_sp< SkTextBlob > MakeFromString(const char *string, const SkFont &font, SkTextEncoding encoding=SkTextEncoding::kUTF8)
sk_sp< SkFontMgr > fontMgr
sk_sp< SkBlender > blender SkRect rect
font
Font Metadata and Metrics.
const myers::Point & get(const myers::Segment &)
REG_FIDDLE(skpaint_xfer, 576, 640, false, 0)
static constexpr SkPoint Make(float x, float y)
static constexpr SkRect MakeWH(float w, float h)