Flutter Engine
The Flutter Engine
third_party
skia
modules
svg
include
SkSVGFeMorphology.h
Go to the documentation of this file.
1
/*
2
* Copyright 2020 Google Inc.
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 SkSVGFeMorphology_DEFINED
9
#define SkSVGFeMorphology_DEFINED
10
11
#include "
modules/svg/include/SkSVGFe.h
"
12
#include "
modules/svg/include/SkSVGTypes.h
"
13
14
class
SkSVGFeMorphology
:
public
SkSVGFe
{
15
public
:
16
struct
Radius
{
17
SkSVGNumberType
fX
;
18
SkSVGNumberType
fY
;
19
};
20
21
enum class
Operator
{
22
kErode,
23
kDilate,
24
};
25
26
static
sk_sp<SkSVGFeMorphology>
Make
() {
27
return
sk_sp<SkSVGFeMorphology>
(
new
SkSVGFeMorphology
());
28
}
29
30
SVG_ATTR
(
Operator
,
Operator
,
Operator::kErode
)
31
SVG_ATTR
(Radius , Radius , Radius({0, 0}))
32
33
protected:
34
sk_sp
<
SkImageFilter
>
onMakeImageFilter
(const
SkSVGRenderContext
&,
35
const
SkSVGFilterContext
&) const override;
36
37
std
::vector<
SkSVGFeInputType
>
getInputs
()
const override
{
return
{this->getIn()}; }
38
39
bool
parseAndSetAttribute
(
const
char
*,
const
char
*)
override
;
40
41
private
:
42
SkSVGFeMorphology
() : INHERITED(
SkSVGTag
::
kFeMorphology
) {}
43
44
using
INHERITED =
SkSVGFe
;
45
};
46
47
#endif
// SkSVGFeMorphology_DEFINED
SkSVGFe.h
SkSVGTag
SkSVGTag
Definition:
SkSVGNode.h:23
SkSVGTag::kFeMorphology
@ kFeMorphology
SVG_ATTR
#define SVG_ATTR(attr_name, attr_type, attr_default)
Definition:
SkSVGNode.h:210
SkSVGTypes.h
SkSVGNumberType
SkScalar SkSVGNumberType
Definition:
SkSVGTypes.h:27
SkImageFilter
Definition:
SkImageFilter.h:35
SkSVGFeInputType
Definition:
SkSVGTypes.h:635
SkSVGFeMorphology
Definition:
SkSVGFeMorphology.h:14
SkSVGFeMorphology::parseAndSetAttribute
bool parseAndSetAttribute(const char *, const char *) override
Definition:
SkSVGFeMorphology.cpp:15
SkSVGFeMorphology::onMakeImageFilter
sk_sp< SkImageFilter > onMakeImageFilter(const SkSVGRenderContext &, const SkSVGFilterContext &) const override
Definition:
SkSVGFeMorphology.cpp:23
SkSVGFeMorphology::Operator
Operator
Definition:
SkSVGFeMorphology.h:21
SkSVGFeMorphology::Operator::kErode
@ kErode
SkSVGFeMorphology::Make
static sk_sp< SkSVGFeMorphology > Make()
Definition:
SkSVGFeMorphology.h:26
SkSVGFeMorphology::getInputs
std::vector< SkSVGFeInputType > getInputs() const override
Definition:
SkSVGFeMorphology.h:37
SkSVGFe
Definition:
SkSVGFe.h:18
SkSVGFe::SkSVGFe
SkSVGFe(SkSVGTag t)
Definition:
SkSVGFe.h:67
SkSVGFilterContext
Definition:
SkSVGFilterContext.h:21
SkSVGRenderContext
Definition:
SkSVGRenderContext.h:63
sk_sp
Definition:
SkRefCnt.h:220
std
Definition:
ref_ptr.h:256
SkSVGFeMorphology::Radius
Definition:
SkSVGFeMorphology.h:16
SkSVGFeMorphology::Radius::fY
SkSVGNumberType fY
Definition:
SkSVGFeMorphology.h:18
SkSVGFeMorphology::Radius::fX
SkSVGNumberType fX
Definition:
SkSVGFeMorphology.h:17
Generated on Sun Jun 23 2024 21:56:07 for Flutter Engine by
1.9.4