2018-06-27 15:00:21 +00:00
SkBlendMode Reference
===
< pre style = "padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0 " >
2018-11-07 19:59:03 +00:00
enum class < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > {
2018-11-09 21:04:58 +00:00
kClear,
kSrc,
kDst,
kSrcOver,
kDstOver,
kSrcIn,
kDstIn,
kSrcOut,
kDstOut,
kSrcATop,
kDstATop,
kXor,
kPlus,
kModulate,
kScreen,
kLastCoeffMode = kScreen,
kOverlay,
kDarken,
kLighten,
kColorDodge,
kColorBurn,
kHardLight,
kSoftLight,
kDifference,
kExclusion,
kMultiply,
kLastSeparableMode = kMultiply,
kHue,
kSaturation,
kColor,
kLuminosity,
kLastMode = kLuminosity,
2018-10-08 18:57:48 +00:00
};
2018-11-09 21:04:58 +00:00
const char* < a href = 'SkBlendMode_Reference#SkBlendMode_Name' > SkBlendMode_Name< / a > (< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > blendMode);
2018-06-27 15:00:21 +00:00
< / pre >
2018-10-16 14:30:28 +00:00
< a name = 'SkBlendMode' > < / a >
---
2018-10-08 18:57:48 +00:00
2018-06-27 15:00:21 +00:00
### Constants
< table style = 'border-collapse: collapse; width: 62.5em' >
< tr >< th style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' > Const</ th >
< th style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > Value</ th >
< th style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' > Details</ th >
< th style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' > Description</ th ></ tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kClear' >< code > SkBlendMode::kClear</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 0</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Clear' > Clear</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
2018-11-09 21:04:58 +00:00
Replaces destination with < a href = 'SkColor_Reference#Alpha' > Alpha< / a > and < a href = 'SkColor_Reference#Color' > Color< / a > components set to zero;
a fully transparent < a href = 'undocumented#Pixel' > pixel< / a > .
2018-06-27 15:00:21 +00:00
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kSrc' >< code > SkBlendMode::kSrc</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 1</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Src' > Src</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
2018-11-09 21:04:58 +00:00
Replaces destination with source. Destination < a href = 'SkColor_Reference#Alpha' > alpha< / a > and < a href = 'SkColor_Reference#Color' > color< / a > component values
are ignored.
2018-06-27 15:00:21 +00:00
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kDst' >< code > SkBlendMode::kDst</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 2</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Dst' > Dst</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
2018-11-09 21:04:58 +00:00
Preserves destination, ignoring source. Drawing with < a href = 'SkPaint_Reference#Paint' > Paint< / a > set to < a href = '#SkBlendMode_kDst' > kDst< / a > has
no effect.
2018-06-27 15:00:21 +00:00
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kSrcOver' >< code > SkBlendMode::kSrcOver</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 3</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Src_Over' > Src Over</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces destination with source blended with destination. If source is opaque,
2018-11-09 21:04:58 +00:00
replaces destination with source. Used as the default < a href = '#Blend_Mode' > Blend_Mode< / a > for < a href = 'SkPaint_Reference#SkPaint' > SkPaint< / a > .
2018-06-27 15:00:21 +00:00
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kDstOver' >< code > SkBlendMode::kDstOver</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 4</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Dst_Over' > Dst Over</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces destination with destination blended with source. If destination is opaque,
has no effect.
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kSrcIn' >< code > SkBlendMode::kSrcIn</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 5</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Src_In' > Src In</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces destination with source using destination opacity.
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kDstIn' >< code > SkBlendMode::kDstIn</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 6</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Dst_In' > Dst In</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Scales destination opacity by source opacity.
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kSrcOut' >< code > SkBlendMode::kSrcOut</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 7</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Src_Out' > Src Out</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces destination with source using the inverse of destination opacity,
drawing source fully where destination opacity is zero.
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kDstOut' >< code > SkBlendMode::kDstOut</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 8</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Dst_Out' > Dst Out</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces destination opacity with inverse of source opacity. If source is
transparent, has no effect.
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kSrcATop' >< code > SkBlendMode::kSrcATop</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 9</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Src_Atop' > Src Atop</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Blends destination with source using read destination opacity.
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kDstATop' >< code > SkBlendMode::kDstATop</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 10</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Dst_Atop' > Dst Atop</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Blends destination with source using source opacity.
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kXor' >< code > SkBlendMode::kXor</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 11</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Xor' > Xor</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Blends destination by exchanging transparency of the source and destination.
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kPlus' >< code > SkBlendMode::kPlus</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 12</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Plus' > Plus</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces destination with source and destination added together.
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kModulate' >< code > SkBlendMode::kModulate</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 13</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Modulate' > Modulate</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces destination with source and destination multiplied together.
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kScreen' >< code > SkBlendMode::kScreen</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 14</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Screen' > Screen</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces destination with inverted source and destination multiplied together.
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kLastCoeffMode' >< code > SkBlendMode::kLastCoeffMode</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 14</ td >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' ></ td >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
last Porter_Duff blend mode< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kOverlay' >< code > SkBlendMode::kOverlay</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 15</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Overlay' > Overlay</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces destination with multiply or screen, depending on destination.
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kDarken' >< code > SkBlendMode::kDarken</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 16</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Darken' > Darken</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces destination with darker of source and destination.
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kLighten' >< code > SkBlendMode::kLighten</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 17</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Lighten' > Lighten</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces destination with lighter of source and destination.
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kColorDodge' >< code > SkBlendMode::kColorDodge</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 18</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Color_Dodge' > Color Dodge</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Makes destination brighter to reflect source.
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kColorBurn' >< code > SkBlendMode::kColorBurn</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 19</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Color_Burn' > Color Burn</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Makes destination darker to reflect source.
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kHardLight' >< code > SkBlendMode::kHardLight</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 20</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Hard_Light' > Hard Light</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Makes destination lighter or darker, depending on source.
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kSoftLight' >< code > SkBlendMode::kSoftLight</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 21</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Soft_Light' > Soft Light</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Makes destination lighter or darker, depending on source.
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kDifference' >< code > SkBlendMode::kDifference</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 22</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Difference' > Difference</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Subtracts darker from lighter with higher contrast.
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kExclusion' >< code > SkBlendMode::kExclusion</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 23</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Exclusion' > Exclusion</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Subtracts darker from lighter with lower contrast.
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kMultiply' >< code > SkBlendMode::kMultiply</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 24</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Multiply' > Multiply</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
2018-11-07 19:59:03 +00:00
Multiplies source with destination, darkening < a href = 'SkImage_Reference#Image' > image< / a > .
2018-06-27 15:00:21 +00:00
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kLastSeparableMode' >< code > SkBlendMode::kLastSeparableMode</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 24</ td >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' ></ td >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
2018-11-07 19:59:03 +00:00
Last blend mode operating separately on components.
2018-06-27 15:00:21 +00:00
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kHue' >< code > SkBlendMode::kHue</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 25</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Hue' > Hue</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces hue of destination with hue of source, leaving saturation and luminosity
unchanged.
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kSaturation' >< code > SkBlendMode::kSaturation</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 26</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Saturation' > Saturation</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces saturation of destination saturation hue of source, leaving hue and
luminosity unchanged.
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kColor' >< code > SkBlendMode::kColor</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 27</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Color' > Color</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces hue and saturation of destination with hue and saturation of source,
leaving luminosity unchanged.
< / td >
< / tr >
< tr style = 'background-color: #f0f0f0 ; ' >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kLuminosity' >< code > SkBlendMode::kLuminosity</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 28</ td >
2018-07-11 20:18:41 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a href = '#Luminosity' > Luminosity</ a > </ td >
2018-06-27 15:00:21 +00:00
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Replaces luminosity of destination with luminosity of source, leaving hue and
saturation unchanged.
< / td >
< / tr >
< tr >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >< a name = 'SkBlendMode_kLastMode' >< code > SkBlendMode::kLastMode</ code ></ a ></ td >
< td style = 'text-align: center; border: 2px solid #dddddd ; padding: 8px; ' > 28</ td >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' ></ td >
< td style = 'text-align: left; border: 2px solid #dddddd ; padding: 8px; ' >
Used by tests to iterate through all valid values.
< / td >
< / tr >
< / table >
### See Also
2018-11-07 19:59:03 +00:00
< a href = 'SkCanvas_Reference#SkCanvas' > SkCanvas< / a > ::< a href = '#SkCanvas_drawColor' > drawColor< / a > < a href = 'SkCanvas_Reference#SkCanvas' > SkCanvas< / a > ::< a href = '#SkCanvas_drawVertices' > drawVertices< / a > < a href = 'SkPaint_Reference#SkPaint' > SkPaint< / a > < a href = 'undocumented#SkShader' > SkShader< / a > ::< a href = '#SkShader_MakeCompose' > MakeCompose< / a > < a href = 'undocumented#SkXfermodeImageFilter' > SkXfermodeImageFilter< / a >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Clear' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kClear' > kClear< / a > sets destination to: < code > [0, 0]< / code > .
Use < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kClear' > kClear< / a > to initialize a buffer to fully transparent pixels when
creating a mask with irregular edges.
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Clear" > < div > < a href = 'SkColor_Reference#SK_ColorYELLOW' > SK_ColorYELLOW< / a > is ignored because < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kClear' > kClear< / a > ignores the source < a href = 'undocumented#Pixel' > pixel< / a >
2018-11-09 21:04:58 +00:00
value and the destination < a href = 'undocumented#Pixel' > pixel< / a > value, always setting the destination to zero.
2018-06-27 15:00:21 +00:00
< / div > < / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = 'SkCanvas_Reference#SkCanvas' > SkCanvas< / a > ::< a href = '#SkCanvas_clear' > clear< / a >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Src' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSrc' > kSrc< / a > sets destination to: < code > [Sa, Sc]< / code > .
Use < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSrc' > kSrc< / a > to copy one buffer to another. All pixels are copied,
regardless of source and destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > values. As a parameter to
< a href = 'SkCanvas_Reference#SkCanvas' > SkCanvas< / a > ::< a href = '#SkCanvas_drawAtlas' > drawAtlas< / a > , selects < a href = 'undocumented#Sprite' > sprites< / a > and ignores colors.
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Src" > < div > < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSrc' > kSrc< / a > does not blend transparent pixels with existing background;
2018-11-09 21:04:58 +00:00
it punches a transparent hole in the existing < a href = 'SkImage_Reference#Image' > image< / a > .
2018-06-27 15:00:21 +00:00
< / div > < / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = 'SkSurface_Reference#SkSurface' > SkSurface< / a > ::< a href = '#SkSurface_draw' > draw< / a > < a href = 'SkSurface_Reference#SkSurface' > SkSurface< / a > ::< a href = '#SkSurface_readPixels' > readPixels< / a >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Dst' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kDst' > kDst< / a > preserves destination set to: < code > [Da, Dc]< / code > .
Setting < a href = 'SkPaint_Reference#Paint' > Paint< / a > < a href = '#Blend_Mode' > Blend_Mode< / a > to < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kDst' > kDst< / a > causes drawing with
< a href = 'SkPaint_Reference#Paint' > Paint< / a > to have no effect. As a parameter to < a href = 'SkCanvas_Reference#SkCanvas' > SkCanvas< / a > ::< a href = '#SkCanvas_drawAtlas' > drawAtlas< / a > ,
selects colors and ignores < a href = 'undocumented#Sprite' > sprites< / a > .
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Dst" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Src_Over' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode</ a > ::< a href = '#SkBlendMode_kSrcOver' > kSrcOver</ a > replaces destination with: < code > [Sa + Da * (1 - Sa), Sc + Dc * (1 - Sa)]</ code > ,
drawing source over destination. < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSrcOver' > kSrcOver< / a > is the default for < a href = 'SkPaint_Reference#Paint' > Paint< / a > .
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSrcOver' > kSrcOver< / a > cannot make destination more transparent; the result will
be at least as opaque as the less transparent of source and original destination.
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Src_Over" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Dst_Over' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode</ a > ::< a href = '#SkBlendMode_kDstOver' > kDstOver</ a > replaces destination with: < code > [Da + Sa * (1 - Da), Dc + Sc * (1 - Da)]</ code > ,
2018-06-27 15:00:21 +00:00
drawing destination over source. Has no effect destination if is opaque.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Dst_Over" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Src_In' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
Condense embedded formulas.
Bookmaker delimits formulas and equations to allow
representing variables and symbols without tripping
up reference lookup, spell checking, and comment
generation.
Before, formulas were represented with:
some text
#Formula
(x + y, 0)
##
, and more text
This made it difficult to know when spacing should
be preserved before and after the formula. Now,
formulas are represented with:
some text #Formula # (x + y, 0) ##, and more text
The presence or absence of a space between ## and ,
is now significant (before it was not).
Also, formulas are bracketed by <code> in markdown
generation, so that variables stand out better.
See:
https://skia.org/user/api/SkBlendMode_Reference?cl=152781#Dst_Out
for an example.
Also fixed 100 column offenders and added a code
check to identify them. For the moment, 100 column
offenders are outed with SkDebugf but their presence
does not cause bookmaker to fail.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=152781
Bug: skia:6898
Change-Id: If92a65a234f5d616bf4485984a8d219a6f04821a
Reviewed-on: https://skia-review.googlesource.com/152781
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-09-13 16:04:30 +00:00
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > ;
2018-11-09 21:04:58 +00:00
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode</ a > ::< a href = '#SkBlendMode_kSrcIn' > kSrcIn</ a > replaces destination with: < code > [Sa * Da, Sc * Da]</ code > ,
2018-06-27 15:00:21 +00:00
drawing source with destination opacity.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Src_In" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Dst_In' > < / a >
---
2018-06-27 15:00:21 +00:00
Condense embedded formulas.
Bookmaker delimits formulas and equations to allow
representing variables and symbols without tripping
up reference lookup, spell checking, and comment
generation.
Before, formulas were represented with:
some text
#Formula
(x + y, 0)
##
, and more text
This made it difficult to know when spacing should
be preserved before and after the formula. Now,
formulas are represented with:
some text #Formula # (x + y, 0) ##, and more text
The presence or absence of a space between ## and ,
is now significant (before it was not).
Also, formulas are bracketed by <code> in markdown
generation, so that variables stand out better.
See:
https://skia.org/user/api/SkBlendMode_Reference?cl=152781#Dst_Out
for an example.
Also fixed 100 column offenders and added a code
check to identify them. For the moment, 100 column
offenders are outed with SkDebugf but their presence
does not cause bookmaker to fail.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=152781
Bug: skia:6898
Change-Id: If92a65a234f5d616bf4485984a8d219a6f04821a
Reviewed-on: https://skia-review.googlesource.com/152781
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-09-13 16:04:30 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > ,
2018-11-09 21:04:58 +00:00
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode</ a > ::< a href = '#SkBlendMode_kDstIn' > kDstIn</ a > replaces destination with: < code > [Da * Sa, Dc * Sa]</ code > ,
scaling destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > by source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > . Resulting
destination is visible where source is visible.
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Dst_In" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Src_Out' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
Condense embedded formulas.
Bookmaker delimits formulas and equations to allow
representing variables and symbols without tripping
up reference lookup, spell checking, and comment
generation.
Before, formulas were represented with:
some text
#Formula
(x + y, 0)
##
, and more text
This made it difficult to know when spacing should
be preserved before and after the formula. Now,
formulas are represented with:
some text #Formula # (x + y, 0) ##, and more text
The presence or absence of a space between ## and ,
is now significant (before it was not).
Also, formulas are bracketed by <code> in markdown
generation, so that variables stand out better.
See:
https://skia.org/user/api/SkBlendMode_Reference?cl=152781#Dst_Out
for an example.
Also fixed 100 column offenders and added a code
check to identify them. For the moment, 100 column
offenders are outed with SkDebugf but their presence
does not cause bookmaker to fail.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=152781
Bug: skia:6898
Change-Id: If92a65a234f5d616bf4485984a8d219a6f04821a
Reviewed-on: https://skia-review.googlesource.com/152781
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-09-13 16:04:30 +00:00
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > ;
2018-11-09 21:04:58 +00:00
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode</ a > ::< a href = '#SkBlendMode_kSrcOut' > kSrcOut</ a > replaces destination with: < code > [Sa * (1 - Da), Sc * (1 - Da)]</ code > ,
drawing source fully where destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > is zero. Is destination
is opaque, has no effect.
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Src_Out" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Dst_Out' > < / a >
---
2018-06-27 15:00:21 +00:00
Condense embedded formulas.
Bookmaker delimits formulas and equations to allow
representing variables and symbols without tripping
up reference lookup, spell checking, and comment
generation.
Before, formulas were represented with:
some text
#Formula
(x + y, 0)
##
, and more text
This made it difficult to know when spacing should
be preserved before and after the formula. Now,
formulas are represented with:
some text #Formula # (x + y, 0) ##, and more text
The presence or absence of a space between ## and ,
is now significant (before it was not).
Also, formulas are bracketed by <code> in markdown
generation, so that variables stand out better.
See:
https://skia.org/user/api/SkBlendMode_Reference?cl=152781#Dst_Out
for an example.
Also fixed 100 column offenders and added a code
check to identify them. For the moment, 100 column
offenders are outed with SkDebugf but their presence
does not cause bookmaker to fail.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=152781
Bug: skia:6898
Change-Id: If92a65a234f5d616bf4485984a8d219a6f04821a
Reviewed-on: https://skia-review.googlesource.com/152781
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-09-13 16:04:30 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > ,
2018-11-09 21:04:58 +00:00
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode</ a > ::< a href = '#SkBlendMode_kDstOut' > kDstOut</ a > replaces destination with: < code > [Da * (1 - Sa), Dc * (1 - Sa)]</ code > ,
scaling destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > by source transparency. Resulting
destination is visible where source is transparent. If source is transparent,
has no effect.
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Dst_Out" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Src_Atop' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode</ a > ::< a href = '#SkBlendMode_kSrcATop' > kSrcATop</ a > replaces destination with: < code > [Da, Sc * Da + Dc * (1 - Sa)]</ code > ,
2018-06-27 15:00:21 +00:00
replacing opaque destination with opaque source. If source or destination
is transparent, has no effect.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Src_Atop" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Dst_Atop' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode</ a > ::< a href = '#SkBlendMode_kDstATop' > kDstATop</ a > replaces destination with: < code > [Sa, Dc * Sa + Sc * (1 - Da)]</ code > ,
2018-06-27 15:00:21 +00:00
making destination transparent where source is transparent.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Dst_Atop" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Xor' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kXor' > kXor< / a > replaces destination with:
2018-11-07 19:59:03 +00:00
< code > [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa)]</ code > ,
2018-06-27 15:00:21 +00:00
exchanging the transparency of the source and destination.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Xor" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Plus' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kPlus' > kPlus< / a > replaces destination with: < code > [Sa + Da, Sc + Dc]< / code > ,
summing the < a href = 'SkColor_Reference#Alpha' > Alpha< / a > and < a href = 'SkColor_Reference#Color' > Color< / a > components.
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Plus" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Modulate' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode</ a > ::< a href = '#SkBlendMode_kModulate' > kModulate</ a > replaces destination with: < code > [Sa * Da, Sc * Dc]</ code > ,
scaling < a href = 'SkColor_Reference#Alpha' > Alpha< / a > and < a href = 'SkColor_Reference#Color' > Color< / a > components by the lesser of the values.
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kModulate' > kModulate< / a > differs from < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kMultiply' > kMultiply< / a > in two ways.
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kModulate' > kModulate< / a > like < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSrcATop' > kSrcATop< / a > alters the destination inside
the destination area, as if the destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > defined the boundaries of a
soft clip. < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kMultiply' > kMultiply< / a > like < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSrcOver' > kSrcOver< / a > can alter the
destination where the destination is transparent.
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kModulate' > kModulate< / a > computes the product of the source and destination using
< a href = 'undocumented#Premultiply' > Premultiplied< / a > component values. < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kMultiply' > kMultiply< / a > the product of the source
and destination using < a href = 'undocumented#Unpremultiply' > Unpremultiplied< / a > component values.
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Modulate" > < div > If source and destination are opaque, < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kModulate' > kModulate< / a > and
2018-11-09 21:04:58 +00:00
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kMultiply' > kMultiply< / a > produce the same results.
2018-06-27 15:00:21 +00:00
< / div > < / fiddle-embed > < / div >
2018-10-16 14:30:28 +00:00
< a name = 'Screen' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode</ a > ::< a href = '#SkBlendMode_kScreen' > kScreen</ a > replaces destination with: < code > [Sa + Da - Sa * Da, Sc + Dc - Sc * Dc]</ code > .
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Screen" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Overlay' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kOverlay' > kOverlay< / a > replaces destination with:
2018-11-07 19:59:03 +00:00
< code > [Sa + Da - Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa) +
(2 * Dc <= Da ? 2 * Sc * Dc : Sa * Da - 2 * (Da - Dc) * (Sa - Sc))]</ code > .
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Overlay" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Darken' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kDarken' > kDarken< / a > replaces destination with:
< code > [Sa + Da - Sa * Da, Sc + Dc - <a href='undocumented#max()'>max</a>(Sc * Da, Dc * Sa)]</ code > .
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kDarken' > kDarken< / a > does not make an < a href = 'SkImage_Reference#Image' > image< / a > darker; it replaces the destination
component with source if source is darker.
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Darken" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Lighten' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kLighten' > kLighten< / a > replaces destination with:
< code > [Sa + Da - Sa * Da, Sc + Dc - <a href='undocumented#min()'>min</a>(Sc * Da, Dc * Sa)]</ code > .
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kDarken' > kDarken< / a > does not make an < a href = 'SkImage_Reference#Image' > image< / a > lighter; it replaces the destination
component with source if source is lighter.
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Lighten" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Color_Dodge' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kColorDodge' > kColorDodge< / a > replaces destination with:
2018-11-07 19:59:03 +00:00
< code > [Sa + Da - Sa * Da, Dc == 0 ? Sc * (1 - Da) : Sc == Sa ? Sc + Da * (1 - Sa) :
2018-11-09 21:04:58 +00:00
Sa * <a href='undocumented#min()'>min</a>(Da, Dc * Sa / (Sa - Sc)) + Sc * (1 - Da) + Da * (1 - Sa)]</ code > ,
2018-06-27 15:00:21 +00:00
making destination brighter to reflect source.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Color_Dodge" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Color_Burn' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kColorBurn' > kColorBurn< / a > replaces destination with:
2018-11-07 19:59:03 +00:00
< code > [Sa + Da - Sa * Da, Dc == Da ? Dc + Sc * (1 - Da) : Sc == 0 ? Da * (1 - Sa) :
2018-11-09 21:04:58 +00:00
Sa * (Da - <a href='undocumented#min()'>min</a>(Da, (Da - Dc) * Sa / Sc)) + Sc * (1 - Da) + Da * (1 - Sa)]</ code > ,
2018-06-27 15:00:21 +00:00
making destination darker to reflect source.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Color_Burn" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Hard_Light' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kHardLight' > kHardLight< / a > replaces destination with:
2018-11-07 19:59:03 +00:00
< code > [Sa + Da - Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa) +
2 * Sc <= Sa ? 2 * Sc * Dc : Sa * Da - 2 * (Da - Dc) * (Sa - Sc)]</ code > ,
2018-06-27 15:00:21 +00:00
making destination lighter or darker, depending on source.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Hard_Light" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Soft_Light' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
where < code > m = Da > 0 ? Dc / Da : 0< / code > ;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSoftLight' > kSoftLight< / a > replaces destination with: < code > [Sa + Da - Sa * Da, Sc / Da + Dc / Sa +
2018-11-07 19:59:03 +00:00
(2 * Sc <= Sa ? Dc * (Sa + (2 * Sc - Sa) * (1 - m)) : Dc * Sa + Da * (2 * Sc - Sa) *
2018-11-09 21:04:58 +00:00
(4 * Dc <= Da ? (16 * m * m + 4 * m) * (m - 1) + 7 * m : < a href = 'undocumented#sqrt()' > sqrt</ a > (m) - m))]</ code > ,
2018-06-27 15:00:21 +00:00
making destination lighter or darker, depending on source.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Soft_Light" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Difference' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kDifference' > kDifference< / a > replaces destination with:
< code > [Sa + Da - Sa * Da, Sc + Dc - 2 * < a href = 'undocumented#min()' > min</ a > (Sc * Da, Dc * Sa)]</ code > ,
2018-06-27 15:00:21 +00:00
replacing destination with lighter less darker.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Difference" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Exclusion' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kExclusion' > kExclusion< / a > replaces destination with:
2018-11-07 19:59:03 +00:00
< code > [Sa + Da - Sa * Da, Sc + Dc - 2 * Sc * Dc]</ code > ,
2018-06-27 15:00:21 +00:00
replacing destination with lighter less darker, ignoring < a href = 'SkColor_Reference#Alpha' > Alpha< / a > .
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Exclusion" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Multiply' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-09 21:04:58 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Sc< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > component,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > Dc< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > component;
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kMultiply' > kMultiply< / a > replaces destination with:
2018-11-07 19:59:03 +00:00
< code > [Sa + Da - Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa) + Sc * Dc]</ code > ,
2018-11-09 21:04:58 +00:00
the product of < a href = 'undocumented#Unpremultiply' > Unpremultiplied< / a > source and destination.
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kMultiply' > kMultiply< / a > makes the < a href = 'SkImage_Reference#Image' > image< / a > darker.
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Multiply" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Hue' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-07 19:59:03 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > S< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > ,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > D< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > ;
2018-11-09 21:04:58 +00:00
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kHue' > kHue< / a > replaces destination with:
< code > [Sa + Da - Sa * Da, < a href = 'undocumented#SetLuminosity' > SetLuminosity< / a > (< a href = 'undocumented#SetSaturation' > SetSaturation< / a > (S, < a href = 'undocumented#Saturation' > Saturation< / a > (D)), < a href = 'undocumented#Luminosity' > Luminosity< / a > (D))]< / code > ,
2018-06-27 15:00:21 +00:00
source hue, leaving destination luminosity and saturation unchanged.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Hue" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Saturation' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-07 19:59:03 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > S< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > ,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > D< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > ;
2018-11-09 21:04:58 +00:00
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kHue' > kHue< / a > replaces destination with:
< code > [Sa + Da - Sa * Da, < a href = 'undocumented#SetLuminosity' > SetLuminosity< / a > (< a href = 'undocumented#SetSaturation' > SetSaturation< / a > (D, < a href = 'undocumented#Saturation' > Saturation< / a > (S)), < a href = 'undocumented#Luminosity' > Luminosity< / a > (D))]< / code > ,
2018-06-27 15:00:21 +00:00
source hue, leaving destination luminosity and saturation unchanged.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Saturation" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Color' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-07 19:59:03 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > S< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > ,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > D< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > ;
2018-11-09 21:04:58 +00:00
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kColor' > kColor< / a > replaces destination with:
< code > [Sa + Da - Sa * Da, < a href = 'undocumented#SetLuminosity' > SetLuminosity< / a > (S, < a href = 'undocumented#Luminosity' > Luminosity< / a > (D))]< / code > ,
2018-06-27 15:00:21 +00:00
source hue and saturation, leaving destination luminosity unchanged.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Color" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
2018-10-16 14:30:28 +00:00
< a name = 'Luminosity' > < / a >
---
2018-06-27 15:00:21 +00:00
2018-11-07 19:59:03 +00:00
Given: < code > Sa< / code > as source < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > S< / code > as source < a href = 'SkColor_Reference#Color' > Color< / a > ,
< code > Da< / code > as destination < a href = 'SkColor_Reference#Alpha' > Alpha< / a > , < code > D< / code > as destination < a href = 'SkColor_Reference#Color' > Color< / a > ;
2018-11-09 21:04:58 +00:00
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kLuminosity' > kLuminosity< / a > replaces destination with:
< code > [Sa + Da - Sa * Da, < a href = 'undocumented#SetLuminosity' > SetLuminosity< / a > (D, < a href = 'undocumented#Luminosity' > Luminosity< / a > (S))]< / code > ,
2018-06-27 15:00:21 +00:00
source luminosity, leaving destination hue and saturation unchanged.
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@Luminosity" > < / fiddle-embed > < / div >
2018-06-27 15:00:21 +00:00
< a name = 'SkBlendMode_Name' > < / a >
2018-10-16 14:30:28 +00:00
---
2018-06-27 15:00:21 +00:00
< pre style = "padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0 " >
2018-11-09 21:04:58 +00:00
const char* < a href = 'SkBlendMode_Reference#SkBlendMode_Name' > SkBlendMode_Name< / a > (< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > blendMode)
2018-06-27 15:00:21 +00:00
< / pre >
2018-11-09 21:04:58 +00:00
Returns name of < a href = '#SkBlendMode_Name_blendMode' > blendMode< / a > as null-terminated C < a href = 'undocumented#String' > string< / a > .
2018-06-27 15:00:21 +00:00
### Parameters
< table > < tr > < td > < a name = 'SkBlendMode_Name_blendMode' > < code > < strong > blendMode< / strong > < / code > < / a > < / td >
2018-10-31 16:14:03 +00:00
< td > one of:< / td >
2018-06-27 15:00:21 +00:00
< / tr >
< / table >
2018-10-31 16:14:03 +00:00
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kClear' > kClear< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSrc' > kSrc< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kDst' > kDst< / a > ,
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSrcOver' > kSrcOver< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kDstOver' > kDstOver< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSrcIn' > kSrcIn< / a > ,
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kDstIn' > kDstIn< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSrcOut' > kSrcOut< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kDstOut' > kDstOut< / a > ,
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSrcATop' > kSrcATop< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kDstATop' > kDstATop< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kXor' > kXor< / a > ,
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kPlus' > kPlus< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kModulate' > kModulate< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kScreen' > kScreen< / a > ,
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kOverlay' > kOverlay< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kDarken' > kDarken< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kLighten' > kLighten< / a > ,
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kColorDodge' > kColorDodge< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kColorBurn' > kColorBurn< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kHardLight' > kHardLight< / a > ,
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSoftLight' > kSoftLight< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kDifference' > kDifference< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kExclusion' > kExclusion< / a > ,
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kMultiply' > kMultiply< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kHue' > kHue< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kSaturation' > kSaturation< / a > ,
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kColor' > kColor< / a > , < a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a > ::< a href = '#SkBlendMode_kLuminosity' > kLuminosity< / a >
2018-06-27 15:00:21 +00:00
### Return Value
2018-10-31 16:14:03 +00:00
C < a href = 'undocumented#String' > string< / a >
2018-06-27 15:00:21 +00:00
### Example
2019-10-11 15:46:30 +00:00
< div > < fiddle-embed name = "@BlendMode_Name" >
2018-06-27 15:00:21 +00:00
#### Example Output
~~~~
default blend: SkBlendMode::kSrcOver
~~~~
< / fiddle-embed > < / div >
### See Also
2018-11-07 19:59:03 +00:00
< a href = 'SkBlendMode_Reference#SkBlendMode' > SkBlendMode< / a >
2018-06-27 15:00:21 +00:00