skia2/include/core/SkBlendMode.h
Mike Reed 1834242ec6 Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"
This reverts commit 2cbcd12281.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924

Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a
Reviewed-on: https://skia-review.googlesource.com/2924
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-04 20:09:34 +00:00

52 lines
1.3 KiB
C

/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkBlendMode_DEFINED
#define SkBlendMode_DEFINED
enum class SkBlendMode {
kClear, //!< [0, 0]
kSrc, //!< [Sa, Sc]
kDst, //!< [Da, Dc]
kSrcOver, //!< [Sa + Da * (1 - Sa), Sc + Dc * (1 - Sa)]
kDstOver, //!< [Da + Sa * (1 - Da), Dc + Sc * (1 - Da)]
kSrcIn, //!< [Sa * Da, Sc * Da]
kDstIn, //!< [Da * Sa, Dc * Sa]
kSrcOut, //!< [Sa * (1 - Da), Sc * (1 - Da)]
kDstOut, //!< [Da * (1 - Sa), Dc * (1 - Sa)]
kSrcATop, //!< [Da, Sc * Da + Dc * (1 - Sa)]
kDstATop, //!< [Sa, Dc * Sa + Sc * (1 - Da)]
kXor, //!< [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa)]
kPlus, //!< [Sa + Da, Sc + Dc]
kModulate, // multiplies all components (= alpha and color)
// Following blend modes are defined in the CSS Compositing standard:
// https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending
kScreen,
kLastCoeffMode = kScreen,
kOverlay,
kDarken,
kLighten,
kColorDodge,
kColorBurn,
kHardLight,
kSoftLight,
kDifference,
kExclusion,
kMultiply,
kLastSeparableMode = kMultiply,
kHue,
kSaturation,
kColor,
kLuminosity,
kLastMode = kLuminosity
};
#endif