Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
modules
svg
include
SkSVGRect.h
Go to the documentation of this file.
1
/*
2
* Copyright 2016 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 SkSVGRect_DEFINED
9
#define SkSVGRect_DEFINED
10
11
#include "
modules/svg/include/SkSVGShape.h
"
12
#include "
modules/svg/include/SkSVGTypes.h
"
13
14
class
SkRRect
;
15
16
class
SK_API
SkSVGRect
final :
public
SkSVGShape
{
17
public
:
18
static
sk_sp<SkSVGRect>
Make
() {
return
sk_sp<SkSVGRect>
(
new
SkSVGRect
()); }
19
20
SVG_ATTR
(
X
,
SkSVGLength
,
SkSVGLength
(0))
21
SVG_ATTR
(
Y
,
SkSVGLength
,
SkSVGLength
(0))
22
SVG_ATTR
(Width ,
SkSVGLength
,
SkSVGLength
(0))
23
SVG_ATTR
(Height,
SkSVGLength
,
SkSVGLength
(0))
24
25
SVG_OPTIONAL_ATTR
(Rx,
SkSVGLength
)
26
SVG_OPTIONAL_ATTR
(Ry,
SkSVGLength
)
27
28
protected:
29
bool
parseAndSetAttribute(const
char
*, const
char
*) override;
30
31
void
onDraw(
SkCanvas
*, const
SkSVGLengthContext
&, const
SkPaint
&,
32
SkPathFillType
) const override;
33
34
SkPath
onAsPath(const
SkSVGRenderContext
&) const override;
35
36
SkRect
onObjectBoundingBox(const
SkSVGRenderContext
&) const override;
37
38
private:
39
SkSVGRect
();
40
41
SkRRect
resolve(const
SkSVGLengthContext
&) const;
42
43
using
INHERITED
=
SkSVGShape
;
44
};
45
46
#endif
// SkSVGRect_DEFINED
SK_API
#define SK_API
Definition
SkAPI.h:35
SkPathFillType
SkPathFillType
Definition
SkPathTypes.h:11
INHERITED
#define INHERITED(method,...)
Definition
SkRecorder.cpp:128
SVG_OPTIONAL_ATTR
#define SVG_OPTIONAL_ATTR(attr_name, attr_type)
Definition
SkSVGNode.h:213
SVG_ATTR
#define SVG_ATTR(attr_name, attr_type, attr_default)
Definition
SkSVGNode.h:203
SkSVGShape.h
SkSVGTypes.h
Y
static const SkScalar Y
Definition
StrokeBench.cpp:55
X
static const SkScalar X
Definition
StrokeBench.cpp:54
SkCanvas
Definition
SkCanvas.h:106
SkPaint
Definition
SkPaint.h:44
SkPath
Definition
SkPath.h:59
SkRRect
Definition
SkRRect.h:35
SkSVGLengthContext
Definition
SkSVGRenderContext.h:29
SkSVGLength
Definition
SkSVGTypes.h:116
SkSVGRect
Definition
SkSVGRect.h:16
SkSVGRect::Make
static sk_sp< SkSVGRect > Make()
Definition
SkSVGRect.h:18
SkSVGRenderContext
Definition
SkSVGRenderContext.h:63
SkSVGShape
Definition
SkSVGShape.h:17
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