Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
modules
svg
include
SkSVGUse.h
Go to the documentation of this file.
1
/*
2
* Copyright 2017 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 SkSVGUse_DEFINED
9
#define SkSVGUse_DEFINED
10
11
#include "
modules/svg/include/SkSVGTransformableNode.h
"
12
#include "
modules/svg/include/SkSVGTypes.h
"
13
14
/**
15
* Implements support for <use> (reference) elements.
16
* (https://www.w3.org/TR/SVG11/struct.html#UseElement)
17
*/
18
class
SK_API
SkSVGUse
final :
public
SkSVGTransformableNode
{
19
public
:
20
static
sk_sp<SkSVGUse>
Make
() {
return
sk_sp<SkSVGUse>
(
new
SkSVGUse
()); }
21
22
void
appendChild
(
sk_sp<SkSVGNode>
)
override
;
23
24
SVG_ATTR
(
X
,
SkSVGLength
,
SkSVGLength
(0))
25
SVG_ATTR
(
Y
,
SkSVGLength
,
SkSVGLength
(0))
26
SVG_ATTR
(Href,
SkSVGIRI
,
SkSVGIRI
())
27
28
protected:
29
bool
onPrepareToRender(
SkSVGRenderContext
*) const override;
30
void
onRender(const
SkSVGRenderContext
&) const override;
31
SkPath
onAsPath(const
SkSVGRenderContext
&) const override;
32
SkRect
onObjectBoundingBox(const
SkSVGRenderContext
&) const override;
33
34
private:
35
SkSVGUse
();
36
37
bool
parseAndSetAttribute(const
char
*, const
char
*) override;
38
39
using
INHERITED
=
SkSVGTransformableNode
;
40
};
41
42
#endif
// SkSVGUse_DEFINED
SK_API
#define SK_API
Definition
SkAPI.h:35
INHERITED
#define INHERITED(method,...)
Definition
SkRecorder.cpp:128
SVG_ATTR
#define SVG_ATTR(attr_name, attr_type, attr_default)
Definition
SkSVGNode.h:203
SkSVGTransformableNode.h
SkSVGTypes.h
Y
static const SkScalar Y
Definition
StrokeBench.cpp:55
X
static const SkScalar X
Definition
StrokeBench.cpp:54
SkPath
Definition
SkPath.h:59
SkSVGIRI
Definition
SkSVGTypes.h:152
SkSVGLength
Definition
SkSVGTypes.h:116
SkSVGNode::appendChild
virtual void appendChild(sk_sp< SkSVGNode >)=0
SkSVGRenderContext
Definition
SkSVGRenderContext.h:63
SkSVGTransformableNode
Definition
SkSVGTransformableNode.h:14
SkSVGUse
Definition
SkSVGUse.h:18
SkSVGUse::Make
static sk_sp< SkSVGUse > Make()
Definition
SkSVGUse.h:20
sk_sp
Definition
SkRefCnt.h:220
SkRect
Definition
extension.cpp:13
Generated on Fri Apr 26 2024 06:16:26 for Flutter Engine by
1.9.8