Flutter Engine
The Flutter Engine
third_party
skia
modules
svg
include
SkSVGMask.h
Go to the documentation of this file.
1
/*
2
* Copyright 2021 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 SkSVGMask_DEFINED
9
#define SkSVGMask_DEFINED
10
11
#include "
modules/svg/include/SkSVGHiddenContainer.h
"
12
#include "
modules/svg/include/SkSVGTypes.h
"
13
14
class
SK_API
SkSVGMask
final :
public
SkSVGHiddenContainer
{
15
public
:
16
static
sk_sp<SkSVGMask>
Make
() {
17
return
sk_sp<SkSVGMask>
(
new
SkSVGMask
());
18
}
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
25
SVG_ATTR
(MaskUnits,
SkSVGObjectBoundingBoxUnits
,
26
SkSVGObjectBoundingBoxUnits
(
SkSVGObjectBoundingBoxUnits
::
Type
::kObjectBoundingBox))
27
SVG_ATTR
(MaskContentUnits,
SkSVGObjectBoundingBoxUnits
,
28
SkSVGObjectBoundingBoxUnits
(
SkSVGObjectBoundingBoxUnits
::
Type
::kUserSpaceOnUse))
29
30
private:
31
friend class
SkSVGRenderContext
;
32
33
SkSVGMask
() :
INHERITED
(
SkSVGTag
::
kMask
) {}
34
35
bool
parseAndSetAttribute
(
const
char
*,
const
char
*)
override
;
36
37
SkRect
bounds
(
const
SkSVGRenderContext
&)
const
;
38
void
renderMask(
const
SkSVGRenderContext
&)
const
;
39
40
using
INHERITED
=
SkSVGHiddenContainer
;
41
};
42
43
#endif
// SkSVGMask_DEFINED
SK_API
#define SK_API
Definition:
SkAPI.h:35
SkSVGHiddenContainer.h
SkSVGTag
SkSVGTag
Definition:
SkSVGNode.h:23
SkSVGTag::kMask
@ kMask
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
SkSVGHiddenContainer
Definition:
SkSVGHiddenContainer.h:13
SkSVGHiddenContainer::SkSVGHiddenContainer
SkSVGHiddenContainer(SkSVGTag t)
Definition:
SkSVGHiddenContainer.h:15
SkSVGLength
Definition:
SkSVGTypes.h:116
SkSVGLength::Unit::kPercentage
@ kPercentage
SkSVGMask
Definition:
SkSVGMask.h:14
SkSVGMask::Make
static sk_sp< SkSVGMask > Make()
Definition:
SkSVGMask.h:16
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
SkRecords::bounds
Optional< SkRect > bounds
Definition:
SkRecords.h:189
Type
Definition:
asyncrescaleandread.cpp:530
SkRect
Definition:
extension.cpp:13
Generated on Sun Jun 23 2024 21:56:08 for Flutter Engine by
1.9.4