Skia
2DGraphicsLibrary
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkArithmeticMode.h
1 /*
2  * Copyright 2011 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 #ifndef SkArithmeticMode_DEFINED
9 #define SkArithmeticMode_DEFINED
10 
11 #include "SkFlattenable.h"
12 #include "SkScalar.h"
13 #include "SkXfermode.h"
14 
15 class SK_API SkArithmeticMode {
16 public:
24  static sk_sp<SkXfermode> Make(SkScalar k1, SkScalar k2, SkScalar k3, SkScalar k4,
25  bool enforcePMColor = true);
26 #ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR
27  static SkXfermode* Create(SkScalar k1, SkScalar k2,
28  SkScalar k3, SkScalar k4,
29  bool enforcePMColor = true) {
30  return Make(k1, k2, k3, k4, enforcePMColor).release();
31  }
32 #endif
33 
34  SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP();
35 
36 private:
37  SkArithmeticMode(); // can't be instantiated
38 };
39 
40 #endif
T *SK_WARN_UNUSED_RESULT release()
Return the bare pointer, and set the internal object pointer to nullptr.
Definition: SkRefCnt.h:363
Definition: SkArithmeticMode.h:15
SkXfermode is the base class for objects that are called to implement custom "transfer-modes" in the ...
Definition: SkXfermode.h:34