Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
include
core
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
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
struct
SkRect
;
21
22
/** \class SkMaskFilter
23
24
SkMaskFilter is the base class for object that perform transformations on
25
the mask before drawing it. An example subclass is Blur.
26
*/
27
class
SK_API
SkMaskFilter
:
public
SkFlattenable
{
28
public
:
29
/** Create a blur maskfilter.
30
* @param style The SkBlurStyle to use
31
* @param sigma Standard deviation of the Gaussian blur to apply. Must be > 0.
32
* @param respectCTM if true the blur's sigma is modified by the CTM.
33
* @return The new blur maskfilter
34
*/
35
static
sk_sp<SkMaskFilter>
MakeBlur(
SkBlurStyle
style,
SkScalar
sigma,
36
bool
respectCTM =
true
);
37
38
/**
39
* Returns the approximate bounds that would result from filtering the src rect.
40
* The actual result may be different, but it should be contained within the
41
* returned bounds.
42
*/
43
SkRect
approximateFilteredBounds(
const
SkRect
& src)
const
;
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
SK_API
#define SK_API
Definition
SkAPI.h:35
SkBlurStyle
SkBlurStyle
Definition
SkBlurTypes.h:11
SkFlattenable.h
SkRefCnt.h
SkScalar.h
SkTypes.h
int
Type::kYUV Type::kRGBA() int(0.7 *637)
SkFlattenable
Definition
SkFlattenable.h:28
SkFlattenable::Deserialize
static sk_sp< SkFlattenable > Deserialize(Type, const void *data, size_t length, const SkDeserialProcs *procs=nullptr)
Definition
SkFlattenable.cpp:151
SkMaskFilter
Definition
SkMaskFilter.h:27
sk_sp
Definition
SkRefCnt.h:220
SkScalar
float SkScalar
Definition
extension.cpp:12
SkDeserialProcs
Definition
SkSerialProcs.h:97
SkRect
Definition
extension.cpp:13
Generated on Fri Apr 26 2024 06:16:10 for Flutter Engine by
1.9.8