Skia
2D Graphics Library
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
sk_sp<SkImageFilter>
buildFilterDAG
(
const
SkSVGRenderContext
&)
const
;
19
20
SVG_ATTR
(X,
SkSVGLength
,
SkSVGLength
(-10,
SkSVGLength::Unit::kPercentage
))
21
SVG_ATTR
(Y,
SkSVGLength
,
SkSVGLength
(-10,
SkSVGLength::Unit::kPercentage
))
22
SVG_ATTR
(Width,
SkSVGLength
,
SkSVGLength
(120,
SkSVGLength::Unit::kPercentage
))
23
SVG_ATTR
(Height,
SkSVGLength
,
SkSVGLength
(120,
SkSVGLength::Unit::kPercentage
))
24
SVG_ATTR
(FilterUnits,
25
SkSVGObjectBoundingBoxUnits
,
26
SkSVGObjectBoundingBoxUnits
(
SkSVGObjectBoundingBoxUnits
::Type::kObjectBoundingBox))
27
SVG_ATTR
(PrimitiveUnits,
28
SkSVGObjectBoundingBoxUnits
,
29
SkSVGObjectBoundingBoxUnits
(
SkSVGObjectBoundingBoxUnits
::Type::kUserSpaceOnUse))
30
31
private:
32
SkSVGFilter
() :
INHERITED
(
SkSVGTag
::
kFilter
) {}
33
34
bool
parseAndSetAttribute
(
const
char
*,
const
char
*)
override
;
35
36
using
INHERITED
=
SkSVGHiddenContainer
;
37
};
38
39
#endif
// SkSVGFilter_DEFINED
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:203
SkSVGTypes.h
SkSVGFilter
Definition:
SkSVGFilter.h:14
SkSVGFilter::parseAndSetAttribute
bool parseAndSetAttribute(const char *, const char *) override
SkSVGFilter::buildFilterDAG
sk_sp< SkImageFilter > buildFilterDAG(const SkSVGRenderContext &) const
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
SkSVGObjectBoundingBoxUnits
Definition:
SkSVGTypes.h:454
SkSVGRenderContext
Definition:
SkSVGRenderContext.h:61
SkSVGTransformableNode
Definition:
SkSVGTransformableNode.h:14
sk_sp
Shared pointer class to wrap classes that support a ref()/unref() interface.
Definition:
SkRefCnt.h:220
modules
svg
include
SkSVGFilter.h
Generated by
Doxygen
1.9.1 on Tue Nov 14 2023