Debian Codegraph @

include/core/SkMaskFilter.h

raw
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
11 #include "include/core/SkFlattenable.h"
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
21 /** \class SkMaskFilter
22
23 SkMaskFilter is the base class for object that perform transformations on
24 the mask before drawing it. An example subclass is Blur.
25 */
26 class SK_API SkMaskFilter : public SkFlattenable {
27 public:
28 /** Create a blur maskfilter.
29 * @param style The SkBlurStyle to use
30 * @param sigma Standard deviation of the Gaussian blur to apply. Must be > 0.
31 * @param respectCTM if true the blur's sigma is modified by the CTM.
32 * @return The new blur maskfilter
33 */
34 static sk_sp<SkMaskFilter> MakeBlur(SkBlurStyle style, SkScalar sigma,
35 bool respectCTM = true);
36
37 static sk_sp<SkMaskFilter> Deserialize(const void* data, size_t size,
38 const SkDeserialProcs* procs = nullptr);
39
40 private:
41 static void RegisterFlattenables();
42 friend class SkFlattenable;
43 };
44
45 #endif