Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
modules
svg
include
SkSVGPoly.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 SkSVGPoly_DEFINED
9
#define SkSVGPoly_DEFINED
10
11
#include "
include/core/SkPath.h
"
12
#include "
modules/svg/include/SkSVGShape.h
"
13
14
// Handles <polygon> and <polyline> elements.
15
class
SK_API
SkSVGPoly
final :
public
SkSVGShape
{
16
public
:
17
static
sk_sp<SkSVGPoly>
MakePolygon
() {
18
return
sk_sp<SkSVGPoly>
(
new
SkSVGPoly
(
SkSVGTag::kPolygon
));
19
}
20
21
static
sk_sp<SkSVGPoly>
MakePolyline
() {
22
return
sk_sp<SkSVGPoly>
(
new
SkSVGPoly
(
SkSVGTag::kPolyline
));
23
}
24
25
SVG_ATTR
(Points,
SkSVGPointsType
,
SkSVGPointsType
())
26
27
protected:
28
bool
parseAndSetAttribute(const
char
*, const
char
*) override;
29
30
void
onDraw(
SkCanvas
*, const
SkSVGLengthContext
&, const
SkPaint
&,
31
SkPathFillType
) const override;
32
33
SkPath
onAsPath(const
SkSVGRenderContext
&) const override;
34
35
SkRect
onObjectBoundingBox(const
SkSVGRenderContext
&) const override;
36
37
private:
38
SkSVGPoly
(
SkSVGTag
);
39
40
mutable
SkPath
fPath
;
// mutated in onDraw(), to apply inherited fill types.
41
42
using
INHERITED
=
SkSVGShape
;
43
};
44
45
#endif
// SkSVGPoly_DEFINED
fPath
SkPath fPath
Definition
AAConvexPathRenderer.cpp:886
SK_API
#define SK_API
Definition
SkAPI.h:35
SkPathFillType
SkPathFillType
Definition
SkPathTypes.h:11
SkPath.h
INHERITED
#define INHERITED(method,...)
Definition
SkRecorder.cpp:128
SkSVGTag
SkSVGTag
Definition
SkSVGNode.h:23
SkSVGTag::kPolyline
@ kPolyline
SkSVGTag::kPolygon
@ kPolygon
SVG_ATTR
#define SVG_ATTR(attr_name, attr_type, attr_default)
Definition
SkSVGNode.h:203
SkSVGShape.h
SkSVGPointsType
std::vector< SkPoint > SkSVGPointsType
Definition
SkSVGTypes.h:31
SkCanvas
Definition
SkCanvas.h:106
SkPaint
Definition
SkPaint.h:44
SkPath
Definition
SkPath.h:59
SkSVGLengthContext
Definition
SkSVGRenderContext.h:29
SkSVGPoly
Definition
SkSVGPoly.h:15
SkSVGPoly::MakePolygon
static sk_sp< SkSVGPoly > MakePolygon()
Definition
SkSVGPoly.h:17
SkSVGPoly::MakePolyline
static sk_sp< SkSVGPoly > MakePolyline()
Definition
SkSVGPoly.h:21
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