8 #ifndef SkBlendMode_DEFINED
9 #define SkBlendMode_DEFINED
SK_API const char * SkBlendMode_Name(SkBlendMode blendMode)
Returns name of blendMode as null-terminated C string.
SK_API bool SkBlendMode_AsCoeff(SkBlendMode mode, SkBlendModeCoeff *src, SkBlendModeCoeff *dst)
Returns true if 'mode' is a coefficient-based blend mode (<= kLastCoeffMode).
static constexpr int kSkBlendModeCount
Definition: SkBlendMode.h:76
SkBlendMode
Blends are operators that take in two colors (source, destination) and return a new color.
Definition: SkBlendMode.h:38
@ 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
@ kLastCoeffMode
last porter duff blend mode
@ kColorDodge
brighten destination to reflect source
@ kSrcOver
r = s + (1-sa)*d
@ kXor
r = s*(1-da) + d*(1-sa)
@ kLastSeparableMode
last blend mode operating separately on components
@ 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
@ kLastMode
last valid value
@ 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
SkBlendModeCoeff
For Porter-Duff SkBlendModes (those <= kLastCoeffMode), these coefficients describe the blend equatio...
Definition: SkBlendMode.h:84
@ kSA
inverse dst color (i.e.
@ kDC
inverse src color (i.e.
@ kCoeffCount
inverse dst alpha (i.e.
@ kDA
inverse src alpha (i.e.