Skia
2D Graphics Library
SkMaskFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright 2006 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 SkMaskFilter_DEFINED
9 #define SkMaskFilter_DEFINED
10 
14 #include "include/core/SkScalar.h"
15 
16 class SkMatrix;
17 struct SkRect;
18 
25 public:
33  bool respectCTM = true);
34 
36  return kSkMaskFilter_Type;
37  }
38 
40  return kSkMaskFilter_Type;
41  }
42 
43  static sk_sp<SkMaskFilter> Deserialize(const void* data, size_t size,
44  const SkDeserialProcs* procs = nullptr) {
45  return sk_sp<SkMaskFilter>(static_cast<SkMaskFilter*>(
47  kSkMaskFilter_Type, data, size, procs).release()));
48  }
49 
50 private:
51  static void RegisterFlattenables();
52  friend class SkFlattenable;
53 };
54 
55 #endif
SkFlattenable.h
SkFlattenable::Deserialize
static sk_sp< SkFlattenable > Deserialize(Type, const void *data, size_t length, const SkDeserialProcs *procs=nullptr)
SkBlurTypes.h
SkFlattenable::Type
Type
Definition: SkFlattenable.h:28
SkFlattenable::kSkMaskFilter_Type
@ kSkMaskFilter_Type
Definition: SkFlattenable.h:33
SkScalar.h
SkCoverageMode.h
sk_sp< SkMaskFilter >
SK_API
#define SK_API
Definition: SkTypes.h:181
SkMaskFilter::Deserialize
static sk_sp< SkMaskFilter > Deserialize(const void *data, size_t size, const SkDeserialProcs *procs=nullptr)
Definition: SkMaskFilter.h:43
SkMaskFilter::getFlattenableType
SkFlattenable::Type getFlattenableType() const override
Definition: SkMaskFilter.h:39
SkScalar
float SkScalar
Definition: SkScalar.h:16
SkMaskFilter::MakeBlur
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
Create a blur maskfilter.
SkMatrix
Definition: SkMatrix.h:48
SkMaskFilter::GetFlattenableType
static SkFlattenable::Type GetFlattenableType()
Definition: SkMaskFilter.h:35
SkMaskFilter
Definition: SkMaskFilter.h:24
SkRect
Definition: SkRect.h:579
SkDeserialProcs
Definition: SkSerialProcs.h:61
SkBlurStyle
SkBlurStyle
Definition: SkBlurTypes.h:13
SkFlattenable
Definition: SkFlattenable.h:26