Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Macros | Enumerations
SkSVGNode.h File Reference
#include "include/core/SkRefCnt.h"
#include "modules/svg/include/SkSVGAttribute.h"
#include "modules/svg/include/SkSVGAttributeParser.h"

Go to the source code of this file.

Classes

class  SkSVGNode
 

Macros

#define SVG_PRES_ATTR(attr_name, attr_type, attr_inherited)
 
#define _SVG_ATTR_SETTERS(attr_name, attr_type, attr_default, set_cp, set_mv)
 
#define SVG_ATTR(attr_name, attr_type, attr_default)
 
#define SVG_OPTIONAL_ATTR(attr_name, attr_type)
 

Enumerations

enum class  SkSVGTag {
  kCircle , kClipPath , kDefs , kEllipse ,
  kFeBlend , kFeColorMatrix , kFeComposite , kFeDiffuseLighting ,
  kFeDisplacementMap , kFeDistantLight , kFeFlood , kFeGaussianBlur ,
  kFeImage , kFeMorphology , kFeOffset , kFePointLight ,
  kFeSpecularLighting , kFeSpotLight , kFeTurbulence , kFilter ,
  kG , kImage , kLine , kLinearGradient ,
  kMask , kPath , kPattern , kPolygon ,
  kPolyline , kRadialGradient , kRect , kStop ,
  kSvg , kText , kTextLiteral , kTextPath ,
  kTSpan , kUse
}
 

Macro Definition Documentation

◆ _SVG_ATTR_SETTERS

#define _SVG_ATTR_SETTERS (   attr_name,
  attr_type,
  attr_default,
  set_cp,
  set_mv 
)
Value:
private: \
bool set##attr_name( \
if (pr.isValid()) { this->set##attr_name(*pr); } \
return pr.isValid(); \
} \
bool set##attr_name( \
if (pr.isValid()) { this->set##attr_name(std::move(*pr)); } \
return pr.isValid(); \
} \
public: \
void set##attr_name(const attr_type& a) { set_cp(a); } \
void set##attr_name(attr_type&& a) { set_mv(std::move(a)); }
bool isValid() const
Definition SkTLazy.h:77
struct MyStruct a[10]
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set
Definition switches.h:76

Definition at line 187 of file SkSVGNode.h.

188 : \
189 bool set##attr_name( \
191 if (pr.isValid()) { this->set##attr_name(*pr); } \
192 return pr.isValid(); \
193 } \
194 bool set##attr_name( \
196 if (pr.isValid()) { this->set##attr_name(std::move(*pr)); } \
197 return pr.isValid(); \
198 } \
199 public: \
200 void set##attr_name(const attr_type& a) { set_cp(a); } \
201 void set##attr_name(attr_type&& a) { set_mv(std::move(a)); }

◆ SVG_ATTR

#define SVG_ATTR (   attr_name,
  attr_type,
  attr_default 
)
Value:
private: \
attr_type f##attr_name = attr_default; \
public: \
const attr_type& get##attr_name() const { return f##attr_name; } \
_SVG_ATTR_SETTERS( \
attr_name, attr_type, attr_default, \
[this](const attr_type& a) { this->f##attr_name = a; }, \
[this](attr_type&& a) { this->f##attr_name = std::move(a); })

Definition at line 203 of file SkSVGNode.h.

204 : \
205 attr_type f##attr_name = attr_default; \
206 public: \
207 const attr_type& get##attr_name() const { return f##attr_name; } \
208 _SVG_ATTR_SETTERS( \
209 attr_name, attr_type, attr_default, \
210 [this](const attr_type& a) { this->f##attr_name = a; }, \
211 [this](attr_type&& a) { this->f##attr_name = std::move(a); })

◆ SVG_OPTIONAL_ATTR

#define SVG_OPTIONAL_ATTR (   attr_name,
  attr_type 
)
Value:
private: \
SkTLazy<attr_type> f##attr_name; \
public: \
const SkTLazy<attr_type>& get##attr_name() const { return f##attr_name; } \
_SVG_ATTR_SETTERS( \
attr_name, attr_type, attr_default, \
[this](const attr_type& a) { this->f##attr_name.set(a); }, \
[this](attr_type&& a) { this->f##attr_name.set(std::move(a)); })
T * set(const T &src)
Definition SkTLazy.h:56

Definition at line 213 of file SkSVGNode.h.

214 : \
215 SkTLazy<attr_type> f##attr_name; \
216 public: \
217 const SkTLazy<attr_type>& get##attr_name() const { return f##attr_name; } \
218 _SVG_ATTR_SETTERS( \
219 attr_name, attr_type, attr_default, \
220 [this](const attr_type& a) { this->f##attr_name.set(a); }, \
221 [this](attr_type&& a) { this->f##attr_name.set(std::move(a)); })

◆ SVG_PRES_ATTR

#define SVG_PRES_ATTR (   attr_name,
  attr_type,
  attr_inherited 
)
Value:
private: \
bool set##attr_name(SkSVGAttributeParser::ParseResult< \
if (pr.isValid()) { this->set##attr_name(std::move(*pr)); } \
return pr.isValid(); \
} \
\
public: \
const SkSVGProperty<attr_type, attr_inherited>& get##attr_name() const { \
return fPresentationAttributes.f##attr_name; \
} \
void set##attr_name(const SkSVGProperty<attr_type, attr_inherited>& v) { \
auto* dest = &fPresentationAttributes.f##attr_name; \
if (!dest->isInheritable() || v.isValue()) { \
/* TODO: If dest is not inheritable, handle v == "inherit" */ \
*dest = v; \
} else { \
} \
} \
auto* dest = &fPresentationAttributes.f##attr_name; \
if (!dest->isInheritable() || v.isValue()) { \
/* TODO: If dest is not inheritable, handle v == "inherit" */ \
*dest = std::move(v); \
} else { \
} \
}
bool isValue() const
Definition SkSVGTypes.h:64
const myers::Point & get(const myers::Segment &)
dest
Definition zip.py:79

Definition at line 64 of file SkSVGNode.h.

65 : \
66 bool set##attr_name(SkSVGAttributeParser::ParseResult< \
68 if (pr.isValid()) { this->set##attr_name(std::move(*pr)); } \
69 return pr.isValid(); \
70 } \
71 \
72public: \
73 const SkSVGProperty<attr_type, attr_inherited>& get##attr_name() const { \
74 return fPresentationAttributes.f##attr_name; \
75 } \
76 void set##attr_name(const SkSVGProperty<attr_type, attr_inherited>& v) { \
77 auto* dest = &fPresentationAttributes.f##attr_name; \
78 if (!dest->isInheritable() || v.isValue()) { \
79 /* TODO: If dest is not inheritable, handle v == "inherit" */ \
80 *dest = v; \
81 } else { \
83 } \
84 } \
85 void set##attr_name(SkSVGProperty<attr_type, attr_inherited>&& v) { \
86 auto* dest = &fPresentationAttributes.f##attr_name; \
87 if (!dest->isInheritable() || v.isValue()) { \
88 /* TODO: If dest is not inheritable, handle v == "inherit" */ \
89 *dest = std::move(v); \
90 } else { \
92 } \
93 }

Enumeration Type Documentation

◆ SkSVGTag

enum class SkSVGTag
strong
Enumerator
kCircle 
kClipPath 
kDefs 
kEllipse 
kFeBlend 
kFeColorMatrix 
kFeComposite 
kFeDiffuseLighting 
kFeDisplacementMap 
kFeDistantLight 
kFeFlood 
kFeGaussianBlur 
kFeImage 
kFeMorphology 
kFeOffset 
kFePointLight 
kFeSpecularLighting 
kFeSpotLight 
kFeTurbulence 
kFilter 
kG 
kImage 
kLine 
kLinearGradient 
kMask 
kPath 
kPattern 
kPolygon 
kPolyline 
kRadialGradient 
kRect 
kStop 
kSvg 
kText 
kTextLiteral 
kTextPath 
kTSpan 
kUse 

Definition at line 23 of file SkSVGNode.h.

23 {
24 kCircle,
26 kDefs,
43 kFilter,
44 kG,
45 kImage,
46 kLine,
48 kMask,
49 kPath,
54 kRect,
55 kStop,
56 kSvg,
57 kText,
60 kTSpan,
61 kUse
62};
@ kFeDistantLight
@ kFeColorMatrix
@ kFeSpecularLighting
@ kFeDisplacementMap
@ kFeGaussianBlur
@ kLinearGradient
@ kFeDiffuseLighting
@ kRadialGradient