Describes how destination pixel is replaced with a combination of itself and source pixel. Blend_Mode may use source, destination, or both. Blend_Mode may operate on each Color component independently, or may allow all source pixel components to contribute to one destination pixel component.
Blend_Mode does not use adjacent pixels to determine the outcome.
Regardless of how Alpha is encoded in source and destination pixel, nearly all Color_Types treat it as ranging from zero to one. And, nearly all Blend_Mode algorithms limit the output so that all results are also zero to one.
kRGBA_F16_SkColorType permits values outside the zero to one range. It is up to the client to ensure that the result is within the range of zero to one, and therefore well-defined.
Draw geometry with transparency using Porter_Duff compositing does not combine transparent source pixels, leaving the destination outside the geometry untouched.
Modes SkBlendMode::kPlus and SkBlendMode::kScreen use simple arithmetic to lighten or darken the destination. Modes SkBlendMode::kOverlay through SkBlendMode::kMultiply use more complicated algorithms to lighten or darken; sometimes one mode does both, as described by Blend Modes .
SkBlendMode::kModulate is a mashup of SkBlendMode::kSrcATop and SkBlendMode::kMultiply. It multiplies all components, including Alpha; unlike SkBlendMode::kMultiply, if either source or destination is transparent, result is transparent. SkBlendMode::kModulate uses Premultiplied values to compute the product; SkBlendMode::kMultiply uses Unpremultiplied values to compute the product.
Modes SkBlendMode::kHue, SkBlendMode::kSaturation, SkBlendMode::kColor, and SkBlendMode::kLuminosity convert source and destination pixels using all components color information, using non-separable blend modes .