Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
modules
svg
include
SkSVGPattern.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 SkSVGPattern_DEFINED
9
#define SkSVGPattern_DEFINED
10
11
#include "
modules/svg/include/SkSVGHiddenContainer.h
"
12
#include "
modules/svg/include/SkSVGTypes.h
"
13
14
class
SkSVGRenderContext
;
15
16
class
SK_API
SkSVGPattern
final :
public
SkSVGHiddenContainer
{
17
public
:
18
static
sk_sp<SkSVGPattern>
Make
() {
19
return
sk_sp<SkSVGPattern>
(
new
SkSVGPattern
());
20
}
21
22
SVG_ATTR
(Href,
SkSVGIRI
,
SkSVGIRI
())
23
SVG_OPTIONAL_ATTR
(
X
,
SkSVGLength
)
24
SVG_OPTIONAL_ATTR
(
Y
,
SkSVGLength
)
25
SVG_OPTIONAL_ATTR
(Width ,
SkSVGLength
)
26
SVG_OPTIONAL_ATTR
(Height ,
SkSVGLength
)
27
SVG_OPTIONAL_ATTR
(PatternTransform,
SkSVGTransformType
)
28
29
protected:
30
SkSVGPattern
();
31
32
bool
parseAndSetAttribute(const
char
*, const
char
*) override;
33
34
bool
onAsPaint(const
SkSVGRenderContext
&,
SkPaint
*) const override;
35
36
private:
37
struct PatternAttributes {
38
SkTLazy<SkSVGLength>
fX,
39
fY,
40
fWidth,
41
fHeight;
42
SkTLazy<SkSVGTransformType>
fPatternTransform;
43
};
44
45
const
SkSVGPattern
* resolveHref(
const
SkSVGRenderContext
&, PatternAttributes*)
const
;
46
const
SkSVGPattern
* hrefTarget(
const
SkSVGRenderContext
&)
const
;
47
48
// TODO:
49
// - patternUnits
50
// - patternContentUnits
51
52
using
INHERITED
=
SkSVGHiddenContainer
;
53
};
54
55
#endif
// SkSVGPattern_DEFINED
SK_API
#define SK_API
Definition
SkAPI.h:35
INHERITED
#define INHERITED(method,...)
Definition
SkRecorder.cpp:128
SkSVGHiddenContainer.h
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
SkSVGTypes.h
Y
static const SkScalar Y
Definition
StrokeBench.cpp:55
X
static const SkScalar X
Definition
StrokeBench.cpp:54
SkMatrix
Definition
SkMatrix.h:54
SkPaint
Definition
SkPaint.h:44
SkSVGHiddenContainer
Definition
SkSVGHiddenContainer.h:13
SkSVGIRI
Definition
SkSVGTypes.h:152
SkSVGLength
Definition
SkSVGTypes.h:116
SkSVGPattern
Definition
SkSVGPattern.h:16
SkSVGPattern::Make
static sk_sp< SkSVGPattern > Make()
Definition
SkSVGPattern.h:18
SkSVGRenderContext
Definition
SkSVGRenderContext.h:63
SkTLazy
Definition
SkTLazy.h:20
sk_sp
Definition
SkRefCnt.h:220
Generated on Fri Apr 26 2024 06:16:26 for Flutter Engine by
1.9.8