Skia
2DGraphicsLibrary
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkColorMatrixFilter.h
1 /*
2  * Copyright 2007 The Android Open Source Project
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 SkColorMatrixFilter_DEFINED
9 #define SkColorMatrixFilter_DEFINED
10 
11 #include "SkColorFilter.h"
12 #include "SkColorMatrix.h"
13 
14 class SK_API SkColorMatrixFilter : public SkColorFilter {
15 public:
22  static sk_sp<SkColorFilter> MakeLightingFilter(SkColor mul, SkColor add);
23 
24 #ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
25  static SkColorFilter* Create(const SkColorMatrix& cm) {
27  }
28  static SkColorFilter* Create(const SkScalar array[20]) {
30  }
31  static SkColorFilter* CreateLightingFilter(SkColor mul, SkColor add) {
32  return MakeLightingFilter(mul, add).release();
33  }
34 #endif
35 };
36 
37 #endif
T *SK_WARN_UNUSED_RESULT release()
Return the bare pointer, and set the internal object pointer to nullptr.
Definition: SkRefCnt.h:363
ColorFilters are optional objects in the drawing pipeline.
Definition: SkColorFilter.h:29
Definition: SkColorMatrixFilter.h:14
Definition: SkColorMatrix.h:13
uint32_t SkColor
32 bit ARGB color value, not premultiplied.
Definition: SkColor.h:28
static sk_sp< SkColorFilter > MakeMatrixFilterRowMajor255(const SkScalar array[20])
Construct a color filter that transforms a color by a 4x5 matrix.