skia2/include/core/SkCoverageMode.h
Cary Clark 4dc5a45405 remove defines and add commas
Preparation for generating bookmaker files for all remaining
interfaces

Standardize enum and enum classes by including a comma after
the last entry.

Replace flatten-related #define in public interfaces
with their equivalent.

The motivation is to give documentation something to refer to.

An alternative would be to move part or all of this out of the
public interface; something I can work on in a follow-up CL.

R=reed@google.com,bsalomon@google.com

Bug: skia:6898
Change-Id: I4b865f6ec3d8f5d31e50448fef7d2714510302f0
Reviewed-on: https://skia-review.googlesource.com/129312
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-05-21 17:33:39 +00:00

31 lines
814 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 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