Describes how destination pixel is replaced with a combination of itself and
source pixel.
Const |
Value |
Details |
Description |
SkBlendMode::kClear |
0 |
Clear |
Replaces destination with Alpha and Color components set to zero;
a fully transparent pixel.
|
SkBlendMode::kSrc |
1 |
Src |
Replaces destination with source. Destination alpha and color component values
are ignored.
|
SkBlendMode::kDst |
2 |
Dst |
Preserves destination, ignoring source. Drawing with Paint set to kDst has
no effect.
|
SkBlendMode::kSrcOver |
3 |
Src Over |
Replaces destination with source blended with destination. If source is opaque,
replaces destination with source. Used as the default Blend Mode for SkPaint.
|
SkBlendMode::kDstOver |
4 |
Dst Over |
Replaces destination with destination blended with source. If destination is opaque,
has no effect.
|
SkBlendMode::kSrcIn |
5 |
Src In |
Replaces destination with source using destination opacity.
|
SkBlendMode::kDstIn |
6 |
Dst In |
Scales destination opacity by source opacity.
|
SkBlendMode::kSrcOut |
7 |
Src Out |
Replaces destination with source using the inverse of destination opacity,
drawing source fully where destination opacity is zero.
|
SkBlendMode::kDstOut |
8 |
Dst Out |
Replaces destination opacity with inverse of source opacity. If source is
transparent, has no effect.
|
SkBlendMode::kSrcATop |
9 |
Src Atop |
Blends destination with source using read destination opacity.
|
SkBlendMode::kDstATop |
10 |
Dst Atop |
Blends destination with source using source opacity.
|
SkBlendMode::kXor |
11 |
Xor |
Blends destination by exchanging transparency of the source and destination.
|
SkBlendMode::kPlus |
12 |
Plus |
Replaces destination with source and destination added together.
|
SkBlendMode::kModulate |
13 |
Modulate |
Replaces destination with source and destination multiplied together.
|
SkBlendMode::kScreen |
14 |
Screen |
Replaces destination with inverted source and destination multiplied together.
|
SkBlendMode::kLastCoeffMode |
14 |
|
last Porter_Duff blend mode |
SkBlendMode::kOverlay |
15 |
Overlay |
Replaces destination with multiply or screen, depending on destination.
|
SkBlendMode::kDarken |
16 |
Darken |
Replaces destination with darker of source and destination.
|
SkBlendMode::kLighten |
17 |
Lighten |
Replaces destination with lighter of source and destination.
|
SkBlendMode::kColorDodge |
18 |
Color Dodge |
Makes destination brighter to reflect source.
|
SkBlendMode::kColorBurn |
19 |
Color Burn |
Makes destination darker to reflect source.
|
SkBlendMode::kHardLight |
20 |
Hard Light |
Makes destination lighter or darker, depending on source.
|
SkBlendMode::kSoftLight |
21 |
Soft Light |
Makes destination lighter or darker, depending on source.
|
SkBlendMode::kDifference |
22 |
Difference |
Subtracts darker from lighter with higher contrast.
|
SkBlendMode::kExclusion |
23 |
Exclusion |
Subtracts darker from lighter with lower contrast.
|
SkBlendMode::kMultiply |
24 |
Multiply |
Multiplies source with destination, darkening image.
|
SkBlendMode::kLastSeparableMode |
24 |
|
Last blend mode operating separately on components.
|
SkBlendMode::kHue |
25 |
Hue |
Replaces hue of destination with hue of source, leaving saturation and luminosity
unchanged.
|
SkBlendMode::kSaturation |
26 |
Saturation |
Replaces saturation of destination saturation hue of source, leaving hue and
luminosity unchanged.
|
SkBlendMode::kColor |
27 |
Color |
Replaces hue and saturation of destination with hue and saturation of source,
leaving luminosity unchanged.
|
SkBlendMode::kLuminosity |
28 |
Luminosity |
Replaces luminosity of destination with luminosity of source, leaving hue and
saturation unchanged.
|
SkBlendMode::kLastMode |
28 |
|
Used by tests to iterate through all valid values.
|
### See Also