245af1ff99
Bug: skia: Change-Id: I51e85eeba9975d20d897672f44935f573654619d Reviewed-on: https://skia-review.googlesource.com/104141 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
31 lines
813 B
C
31 lines
813 B
C
/*
|
||
* Copyright 2018 Google Inc.
|
||
*
|
||
* Use of this source code is governed by a BSD-style license that can be
|
||
* found in the LICENSE file.
|
||
*/
|
||
|
||
#ifndef SkCoverageMode_DEFINED
|
||
#define SkCoverageMode_DEFINED
|
||
|
||
#include "SkTypes.h"
|
||
|
||
/**
|
||
* Describes geometric operations (ala SkRegion::Op) that can be applied to coverage bytes.
|
||
* These can be thought of as variants of porter-duff (SkBlendMode) modes, but only applied
|
||
* to the alpha channel.
|
||
*
|
||
* See SkMaskFilter for ways to use these when combining two different masks.
|
||
*/
|
||
enum class SkCoverageMode {
|
||
kUnion, // A ∪ B A+B-A*B
|
||
kIntersect, // A ∩ B A*B
|
||
kDifference, // A - B A*(1-B)
|
||
kReverseDifference, // B - A B*(1-A)
|
||
kXor, // A ⊕ B A+B-2*A*B
|
||
|
||
kLast = kXor
|
||
};
|
||
|
||
#endif
|