• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2021 Google LLC
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 SkBlenders_DEFINED
9 #define SkBlenders_DEFINED
10 
11 #include "include/core/SkBlender.h"
12 
13 class SK_API SkBlenders {
14 public:
15     /**
16      *  Create a blender that implements the following:
17      *     k1 * src * dst + k2 * src + k3 * dst + k4
18      *  @param k1, k2, k3, k4 The four coefficients.
19      *  @param enforcePMColor If true, the RGB channels will be clamped to the calculated alpha.
20      */
21     static sk_sp<SkBlender> Arithmetic(float k1, float k2, float k3, float k4, bool enforcePremul);
22 
23 private:
24     SkBlenders() = delete;
25 };
26 
27 #endif
28