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 
12 #include "include/core/SkRefCnt.h"
13 #include "include/core/SkScalar.h"
14 #include "include/core/SkTypes.h"
15 
16 #include <cstddef>
17 
18 enum SkBlurStyle : int;
19 struct SkDeserialProcs;
20 struct SkRect;
21 
27 class SK_API SkMaskFilter : public SkFlattenable {
28 public:
36  bool respectCTM = true);
37 
44 
45  static sk_sp<SkMaskFilter> Deserialize(const void* data, size_t size,
46  const SkDeserialProcs* procs = nullptr);
47 
48 private:
49  static void RegisterFlattenables();
50  friend class SkFlattenable;
51 };
52 
53 #endif
SkBlurStyle
Definition: SkBlurTypes.h:11
float SkScalar
Definition: SkScalar.h:14
SkFlattenable is the base class for objects that need to be flattened into a data stream for either t...
Definition: SkFlattenable.h:28
SkMaskFilter is the base class for object that perform transformations on the mask before drawing it.
Definition: SkMaskFilter.h:27
static sk_sp< SkMaskFilter > Deserialize(const void *data, size_t size, const SkDeserialProcs *procs=nullptr)
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
Create a blur maskfilter.
SkRect approximateFilteredBounds(const SkRect &src) const
Returns the approximate bounds that would result from filtering the src rect.
Definition: SkSerialProcs.h:97
SkRect holds four float coordinates describing the upper and lower bounds of a rectangle.
Definition: SkRect.h:582