1 /* 2 * Copyright 2016 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 /* Generated by tools/bookmaker from include/core/SkBlendMode.h and docs/SkBlendMode_Reference.bmh 9 on 2018-07-13 08:15:10. Additional documentation and examples can be found at: 10 https://skia.org/user/api/SkBlendMode_Reference 11 12 You may edit either file directly. Structural changes to public interfaces require 13 editing both files. After editing docs/SkBlendMode_Reference.bmh, run: 14 bookmaker -b docs -i include/core/SkBlendMode.h -p 15 to create an updated version of this file. 16 */ 17 18 #ifndef SkBlendMode_DEFINED 19 #define SkBlendMode_DEFINED 20 21 #include "SkTypes.h" 22 23 enum class SkBlendMode { 24 kClear, //!< replaces destination with zero: fully transparent 25 kSrc, //!< replaces destination 26 kDst, //!< preserves destination 27 kSrcOver, //!< source over destination 28 kDstOver, //!< destination over source 29 kSrcIn, //!< source trimmed inside destination 30 kDstIn, //!< destination trimmed by source 31 kSrcOut, //!< source trimmed outside destination 32 kDstOut, //!< destination trimmed outside source 33 kSrcATop, //!< source inside destination blended with destination 34 kDstATop, //!< destination inside source blended with source 35 kXor, //!< each of source and destination trimmed outside the other 36 kPlus, //!< sum of colors 37 kModulate, //!< product of premultiplied colors; darkens destination 38 kScreen, //!< multiply inverse of pixels, inverting result; brightens destination 39 kLastCoeffMode = kScreen, //!< last porter duff blend mode 40 kOverlay, //!< multiply or screen, depending on destination 41 kDarken, //!< darker of source and destination 42 kLighten, //!< lighter of source and destination 43 kColorDodge, //!< brighten destination to reflect source 44 kColorBurn, //!< darken destination to reflect source 45 kHardLight, //!< multiply or screen, depending on source 46 kSoftLight, //!< lighten or darken, depending on source 47 kDifference, //!< subtract darker from lighter with higher contrast 48 kExclusion, //!< subtract darker from lighter with lower contrast 49 kMultiply, //!< multiply source with destination, darkening image 50 kLastSeparableMode = kMultiply, //!< last blend mode operating separately on components 51 kHue, //!< hue of source with saturation and luminosity of destination 52 kSaturation, //!< saturation of source with hue and luminosity of destination 53 kColor, //!< hue and saturation of source with luminosity of destination 54 kLuminosity, //!< luminosity of source with hue and saturation of destination 55 kLastMode = kLuminosity, //!< last valid value 56 }; 57 58 /** Returns name of blendMode as null-terminated C string. 59 60 @param blendMode one of: 61 SkBlendMode::kClear, SkBlendMode::kSrc, SkBlendMode::kDst, 62 SkBlendMode::kSrcOver, SkBlendMode::kDstOver, SkBlendMode::kSrcIn, 63 SkBlendMode::kDstIn, SkBlendMode::kSrcOut, SkBlendMode::kDstOut, 64 SkBlendMode::kSrcATop, SkBlendMode::kDstATop, SkBlendMode::kXor, 65 SkBlendMode::kPlus, SkBlendMode::kModulate, SkBlendMode::kScreen, 66 SkBlendMode::kOverlay, SkBlendMode::kDarken, SkBlendMode::kLighten, 67 SkBlendMode::kColorDodge, SkBlendMode::kColorBurn, SkBlendMode::kHardLight, 68 SkBlendMode::kSoftLight, SkBlendMode::kDifference, SkBlendMode::kExclusion, 69 SkBlendMode::kMultiply, SkBlendMode::kHue, SkBlendMode::kSaturation, 70 SkBlendMode::kColor, SkBlendMode::kLuminosity 71 @return C string 72 */ 73 SK_API const char* SkBlendMode_Name(SkBlendMode blendMode); 74 75 #endif 76