Flutter Engine
The Flutter Engine
third_party
skia
modules
svg
include
SkSVGFilter.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 SkSVGFilter_DEFINED
9
#define SkSVGFilter_DEFINED
10
11
#include "
modules/svg/include/SkSVGHiddenContainer.h
"
12
#include "
modules/svg/include/SkSVGTypes.h
"
13
14
class
SK_API
SkSVGFilter
final :
public
SkSVGHiddenContainer
{
15
public
:
16
static
sk_sp<SkSVGFilter>
Make
() {
return
sk_sp<SkSVGFilter>
(
new
SkSVGFilter
()); }
17
18
/** Propagates any inherited presentation attributes in the given context. */
19
void
applyProperties(
SkSVGRenderContext
*)
const
;
20
21
sk_sp<SkImageFilter>
buildFilterDAG(
const
SkSVGRenderContext
&)
const
;
22
23
SVG_ATTR
(
X
,
SkSVGLength
,
SkSVGLength
(-10,
SkSVGLength::Unit::kPercentage
))
24
SVG_ATTR
(
Y
,
SkSVGLength
,
SkSVGLength
(-10,
SkSVGLength::Unit::kPercentage
))
25
SVG_ATTR
(Width,
SkSVGLength
,
SkSVGLength
(120,
SkSVGLength::Unit::kPercentage
))
26
SVG_ATTR
(Height,
SkSVGLength
,
SkSVGLength
(120,
SkSVGLength::Unit::kPercentage
))
27
SVG_ATTR
(FilterUnits,
28
SkSVGObjectBoundingBoxUnits
,
29
SkSVGObjectBoundingBoxUnits
(
SkSVGObjectBoundingBoxUnits
::
Type
::kObjectBoundingBox))
30
SVG_ATTR
(PrimitiveUnits,
31
SkSVGObjectBoundingBoxUnits
,
32
SkSVGObjectBoundingBoxUnits
(
SkSVGObjectBoundingBoxUnits
::
Type
::kUserSpaceOnUse))
33
34
private:
35
SkSVGFilter
() :
INHERITED
(
SkSVGTag
::
kFilter
) {}
36
37
bool
parseAndSetAttribute
(
const
char
*,
const
char
*)
override
;
38
39
using
INHERITED
=
SkSVGHiddenContainer
;
40
};
41
42
#endif
// SkSVGFilter_DEFINED
SK_API
#define SK_API
Definition:
SkAPI.h:35
SkSVGAttribute::kFilter
@ kFilter
SkSVGHiddenContainer.h
SkSVGTag
SkSVGTag
Definition:
SkSVGNode.h:23
SVG_ATTR
#define SVG_ATTR(attr_name, attr_type, attr_default)
Definition:
SkSVGNode.h:210
SkSVGTypes.h
Y
static const SkScalar Y
Definition:
StrokeBench.cpp:55
X
static const SkScalar X
Definition:
StrokeBench.cpp:54
SkSVGFilter
Definition:
SkSVGFilter.h:14
SkSVGFilter::Make
static sk_sp< SkSVGFilter > Make()
Definition:
SkSVGFilter.h:16
SkSVGHiddenContainer
Definition:
SkSVGHiddenContainer.h:13
SkSVGHiddenContainer::SkSVGHiddenContainer
SkSVGHiddenContainer(SkSVGTag t)
Definition:
SkSVGHiddenContainer.h:15
SkSVGLength
Definition:
SkSVGTypes.h:116
SkSVGLength::Unit::kPercentage
@ kPercentage
SkSVGNode::parseAndSetAttribute
virtual bool parseAndSetAttribute(const char *name, const char *value)
Definition:
SkSVGNode.cpp:90
SkSVGObjectBoundingBoxUnits
Definition:
SkSVGTypes.h:454
SkSVGRenderContext
Definition:
SkSVGRenderContext.h:63
SkSVGTransformableNode
Definition:
SkSVGTransformableNode.h:14
sk_sp
Definition:
SkRefCnt.h:220
Type
Definition:
asyncrescaleandread.cpp:530
Generated on Sun Jun 23 2024 21:56:07 for Flutter Engine by
1.9.4