Flutter Engine
The Flutter Engine
SkSVGTypes.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 SkSVGTypes_DEFINED
9#define SkSVGTypes_DEFINED
10
13#include "include/core/SkPath.h"
15#include "include/core/SkRect.h"
18#include "include/core/SkSpan.h"
21
22#include <optional>
23#include <vector>
24
31using SkSVGPointsType = std::vector<SkPoint>;
32
34 kUnspecified,
36 kValue,
37};
38
39// https://www.w3.org/TR/SVG11/intro.html#TermProperty
40template <typename T, bool kInheritable> class SkSVGProperty {
41public:
42 using ValueT = T;
43
45
47
48 explicit SkSVGProperty(const T& value) : fState(SkSVGPropertyState::kValue) {
49 fValue = value;
50 }
51
53 fValue = std::move(value);
54 }
55
56 template <typename... Args>
57 void init(Args&&... args) {
59 fValue.emplace(std::forward<Args>(args)...);
60 }
61
62 constexpr bool isInheritable() const { return kInheritable; }
63
64 bool isValue() const { return fState == SkSVGPropertyState::kValue; }
65
66 T* getMaybeNull() const {
67 return fValue.has_value() ? &fValue.value() : nullptr;
68 }
69
71 fState = state;
72 if (fState != SkSVGPropertyState::kValue) {
73 fValue.reset();
74 }
75 }
76
77 void set(const T& value) {
79 fValue = value;
80 }
81
82 void set(T&& value) {
84 fValue = std::move(value);
85 }
86
89 SkASSERT(fValue.has_value());
90 return &fValue.value();
91 }
92
93 const T* operator->() const {
95 SkASSERT(fValue.has_value());
96 return &fValue.value();
97 }
98
101 SkASSERT(fValue.has_value());
102 return *fValue;
103 }
104
105 const T& operator*() const {
107 SkASSERT(fValue.has_value());
108 return *fValue;
109 }
110
111private:
112 SkSVGPropertyState fState;
113 std::optional<T> fValue;
114};
115
117public:
118 enum class Unit {
119 kUnknown,
120 kNumber,
121 kPercentage,
122 kEMS,
123 kEXS,
124 kPX,
125 kCM,
126 kMM,
127 kIN,
128 kPT,
129 kPC,
130 };
131
132 constexpr SkSVGLength() : fValue(0), fUnit(Unit::kUnknown) {}
133 explicit constexpr SkSVGLength(SkScalar v, Unit u = Unit::kNumber)
134 : fValue(v), fUnit(u) {}
135 SkSVGLength(const SkSVGLength&) = default;
137
138 bool operator==(const SkSVGLength& other) const {
139 return fUnit == other.fUnit && fValue == other.fValue;
140 }
141 bool operator!=(const SkSVGLength& other) const { return !(*this == other); }
142
143 const SkScalar& value() const { return fValue; }
144 const Unit& unit() const { return fUnit; }
145
146private:
147 SkScalar fValue;
148 Unit fUnit;
149};
150
151// https://www.w3.org/TR/SVG11/linking.html#IRIReference
153public:
154 enum class Type {
155 kLocal,
156 kNonlocal,
157 kDataURI,
158 };
159
160 SkSVGIRI() : fType(Type::kLocal) {}
161 SkSVGIRI(Type t, const SkSVGStringType& iri) : fType(t), fIRI(iri) {}
162
163 Type type() const { return fType; }
164 const SkSVGStringType& iri() const { return fIRI; }
165
166 bool operator==(const SkSVGIRI& other) const {
167 return fType == other.fType && fIRI == other.fIRI;
168 }
169 bool operator!=(const SkSVGIRI& other) const { return !(*this == other); }
170
171private:
172 Type fType;
173 SkSVGStringType fIRI;
174};
175
176// https://www.w3.org/TR/SVG11/types.html#InterfaceSVGColor
178public:
179 enum class Type {
180 kCurrentColor,
181 kColor,
182 kICCColor,
183 };
184 using Vars = std::vector<SkString>;
185
187 explicit SkSVGColor(const SkSVGColorType& c) : fType(Type::kColor), fColor(c), fVars(nullptr) {}
188 explicit SkSVGColor(Type t, Vars&& vars)
189 : fType(t), fColor(SK_ColorBLACK)
190 , fVars(vars.empty() ? nullptr : new RefCntVars(std::move(vars))) {}
191 explicit SkSVGColor(const SkSVGColorType& c, Vars&& vars)
192 : fType(Type::kColor), fColor(c)
193 , fVars(vars.empty() ? nullptr : new RefCntVars(std::move(vars))) {}
194
195 SkSVGColor(const SkSVGColor&) = default;
196 SkSVGColor& operator=(const SkSVGColor&) = default;
197 SkSVGColor(SkSVGColor&&) = default;
199
200 bool operator==(const SkSVGColor& other) const {
201 return fType == other.fType && fColor == other.fColor && fVars == other.fVars;
202 }
203 bool operator!=(const SkSVGColor& other) const { return !(*this == other); }
204
205 Type type() const { return fType; }
206 const SkSVGColorType& color() const { SkASSERT(fType == Type::kColor); return fColor; }
208 return fVars ? SkSpan<const SkString>(fVars->fData) : SkSpan<const SkString>();
209 }
211 return fVars ? SkSpan<SkString>(fVars->fData) : SkSpan<SkString>();
212 }
213
214private:
215 Type fType;
216 SkSVGColorType fColor;
217 struct RefCntVars : public SkNVRefCnt<RefCntVars> {
218 RefCntVars(Vars&& vars) : fData(std::move(vars)) {}
219 Vars fData;
220 };
221 sk_sp<RefCntVars> fVars;
222};
223
225public:
226 enum class Type {
227 kNone,
228 kColor,
229 kIRI,
230 };
231
232 SkSVGPaint() : fType(Type::kNone), fColor(SK_ColorBLACK) {}
233 explicit SkSVGPaint(Type t) : fType(t), fColor(SK_ColorBLACK) {}
234 explicit SkSVGPaint(SkSVGColor c) : fType(Type::kColor), fColor(std::move(c)) {}
235 SkSVGPaint(const SkSVGIRI& iri, SkSVGColor fallback_color)
236 : fType(Type::kIRI), fColor(std::move(fallback_color)), fIRI(iri) {}
237
238 SkSVGPaint(const SkSVGPaint&) = default;
239 SkSVGPaint& operator=(const SkSVGPaint&) = default;
240 SkSVGPaint(SkSVGPaint&&) = default;
242
243 bool operator==(const SkSVGPaint& other) const {
244 return fType == other.fType && fColor == other.fColor && fIRI == other.fIRI;
245 }
246 bool operator!=(const SkSVGPaint& other) const { return !(*this == other); }
247
248 Type type() const { return fType; }
249 const SkSVGColor& color() const {
250 SkASSERT(fType == Type::kColor || fType == Type::kIRI);
251 return fColor;
252 }
253 const SkSVGIRI& iri() const { SkASSERT(fType == Type::kIRI); return fIRI; }
254
255private:
256 Type fType;
257
258 // Logical union.
259 SkSVGColor fColor;
260 SkSVGIRI fIRI;
261};
262
263// <funciri> | none (used for clip/mask/filter properties)
265public:
266 enum class Type {
267 kNone,
268 kIRI,
269 };
270
271 SkSVGFuncIRI() : fType(Type::kNone) {}
272 explicit SkSVGFuncIRI(Type t) : fType(t) {}
273 explicit SkSVGFuncIRI(SkSVGIRI&& iri) : fType(Type::kIRI), fIRI(std::move(iri)) {}
274
275 bool operator==(const SkSVGFuncIRI& other) const {
276 return fType == other.fType && fIRI == other.fIRI;
277 }
278 bool operator!=(const SkSVGFuncIRI& other) const { return !(*this == other); }
279
280 Type type() const { return fType; }
281 const SkSVGIRI& iri() const { SkASSERT(fType == Type::kIRI); return fIRI; }
282
283private:
284 Type fType;
285 SkSVGIRI fIRI;
286};
287
288enum class SkSVGLineCap {
289 kButt,
290 kRound,
291 kSquare,
292};
293
295public:
296 enum class Type {
297 kMiter,
298 kRound,
299 kBevel,
300 kInherit,
301 };
302
303 constexpr SkSVGLineJoin() : fType(Type::kInherit) {}
304 constexpr explicit SkSVGLineJoin(Type t) : fType(t) {}
305
306 SkSVGLineJoin(const SkSVGLineJoin&) = default;
308
309 bool operator==(const SkSVGLineJoin& other) const { return fType == other.fType; }
310 bool operator!=(const SkSVGLineJoin& other) const { return !(*this == other); }
311
312 Type type() const { return fType; }
313
314private:
315 Type fType;
316};
317
319public:
320 // These values must match Skia's SkShader::TileMode enum.
321 enum class Type {
322 kPad, // kClamp_TileMode
323 kRepeat, // kRepeat_TileMode
324 kReflect, // kMirror_TileMode
325 };
326
327 constexpr SkSVGSpreadMethod() : fType(Type::kPad) {}
328 constexpr explicit SkSVGSpreadMethod(Type t) : fType(t) {}
329
332
333 bool operator==(const SkSVGSpreadMethod& other) const { return fType == other.fType; }
334 bool operator!=(const SkSVGSpreadMethod& other) const { return !(*this == other); }
335
336 Type type() const { return fType; }
337
338private:
339 Type fType;
340};
341
343public:
344 enum class Type {
345 kNonZero,
346 kEvenOdd,
347 kInherit,
348 };
349
350 constexpr SkSVGFillRule() : fType(Type::kInherit) {}
351 constexpr explicit SkSVGFillRule(Type t) : fType(t) {}
352
353 SkSVGFillRule(const SkSVGFillRule&) = default;
355
356 bool operator==(const SkSVGFillRule& other) const { return fType == other.fType; }
357 bool operator!=(const SkSVGFillRule& other) const { return !(*this == other); }
358
359 Type type() const { return fType; }
360
362 SkASSERT(fType != Type::kInherit); // should never be called for unresolved values.
363 return fType == Type::kEvenOdd ? SkPathFillType::kEvenOdd : SkPathFillType::kWinding;
364 }
365
366private:
367 Type fType;
368};
369
371public:
372 enum class Type {
373 kVisible,
374 kHidden,
375 kCollapse,
376 kInherit,
377 };
378
379 constexpr SkSVGVisibility() : fType(Type::kVisible) {}
380 constexpr explicit SkSVGVisibility(Type t) : fType(t) {}
381
384
385 bool operator==(const SkSVGVisibility& other) const { return fType == other.fType; }
386 bool operator!=(const SkSVGVisibility& other) const { return !(*this == other); }
387
388 Type type() const { return fType; }
389
390private:
391 Type fType;
392};
393
395public:
396 enum class Type {
397 kNone,
398 kDashArray,
399 kInherit,
400 };
401
402 SkSVGDashArray() : fType(Type::kNone) {}
403 explicit SkSVGDashArray(Type t) : fType(t) {}
404 explicit SkSVGDashArray(std::vector<SkSVGLength>&& dashArray)
405 : fType(Type::kDashArray)
406 , fDashArray(std::move(dashArray)) {}
407
410
411 bool operator==(const SkSVGDashArray& other) const {
412 return fType == other.fType && fDashArray == other.fDashArray;
413 }
414 bool operator!=(const SkSVGDashArray& other) const { return !(*this == other); }
415
416 Type type() const { return fType; }
417
418 const std::vector<SkSVGLength>& dashArray() const { return fDashArray; }
419
420private:
421 Type fType;
422 std::vector<SkSVGLength> fDashArray;
423};
424
426public:
427 enum class Type {
428 kColor,
429 kCurrentColor,
430 kICCColor,
431 kInherit,
432 };
433
434 SkSVGStopColor() : fType(Type::kColor), fColor(SK_ColorBLACK) {}
435 explicit SkSVGStopColor(Type t) : fType(t), fColor(SK_ColorBLACK) {}
436 explicit SkSVGStopColor(const SkSVGColorType& c) : fType(Type::kColor), fColor(c) {}
437
440
441 bool operator==(const SkSVGStopColor& other) const {
442 return fType == other.fType && fColor == other.fColor;
443 }
444 bool operator!=(const SkSVGStopColor& other) const { return !(*this == other); }
445
446 Type type() const { return fType; }
447 const SkSVGColorType& color() const { SkASSERT(fType == Type::kColor); return fColor; }
448
449private:
450 Type fType;
451 SkSVGColorType fColor;
452};
453
455public:
456 enum class Type {
457 kUserSpaceOnUse,
458 kObjectBoundingBox,
459 };
460
461 SkSVGObjectBoundingBoxUnits() : fType(Type::kUserSpaceOnUse) {}
462 explicit SkSVGObjectBoundingBoxUnits(Type t) : fType(t) {}
463
464 bool operator==(const SkSVGObjectBoundingBoxUnits& other) const {
465 return fType == other.fType;
466 }
467 bool operator!=(const SkSVGObjectBoundingBoxUnits& other) const {
468 return !(*this == other);
469 }
470
471 Type type() const { return fType; }
472
473private:
474 Type fType;
475};
476
478public:
479 enum class Type {
480 kFamily,
481 kInherit,
482 };
483
485 explicit SkSVGFontFamily(const char family[])
486 : fType(Type::kFamily)
487 , fFamily(family) {}
488
489 bool operator==(const SkSVGFontFamily& other) const {
490 return fType == other.fType && fFamily == other.fFamily;
491 }
492 bool operator!=(const SkSVGFontFamily& other) const { return !(*this == other); }
493
494 Type type() const { return fType; }
495
496 const SkString& family() const { return fFamily; }
497
498private:
499 Type fType;
500 SkString fFamily;
501};
502
504public:
505 enum class Type {
506 kNormal,
507 kItalic,
508 kOblique,
509 kInherit,
510 };
511
513 explicit SkSVGFontStyle(Type t) : fType(t) {}
514
515 bool operator==(const SkSVGFontStyle& other) const {
516 return fType == other.fType;
517 }
518 bool operator!=(const SkSVGFontStyle& other) const { return !(*this == other); }
519
520 Type type() const { return fType; }
521
522private:
523 Type fType;
524};
525
527public:
528 enum class Type {
529 kLength,
530 kInherit,
531 };
532
533 SkSVGFontSize() : fType(Type::kInherit), fSize(0) {}
534 explicit SkSVGFontSize(const SkSVGLength& s)
535 : fType(Type::kLength)
536 , fSize(s) {}
537
538 bool operator==(const SkSVGFontSize& other) const {
539 return fType == other.fType && fSize == other.fSize;
540 }
541 bool operator!=(const SkSVGFontSize& other) const { return !(*this == other); }
542
543 Type type() const { return fType; }
544
545 const SkSVGLength& size() const { return fSize; }
546
547private:
548 Type fType;
549 SkSVGLength fSize;
550};
551
553public:
554 enum class Type {
555 k100,
556 k200,
557 k300,
558 k400,
559 k500,
560 k600,
561 k700,
562 k800,
563 k900,
564 kNormal,
565 kBold,
566 kBolder,
567 kLighter,
568 kInherit,
569 };
570
572 explicit SkSVGFontWeight(Type t) : fType(t) {}
573
574 bool operator==(const SkSVGFontWeight& other) const {
575 return fType == other.fType;
576 }
577 bool operator!=(const SkSVGFontWeight& other) const { return !(*this == other); }
578
579 Type type() const { return fType; }
580
581private:
582 Type fType;
583};
584
586 enum Align : uint8_t {
587 // These values are chosen such that bits [0,1] encode X alignment, and
588 // bits [2,3] encode Y alignment.
589 kXMinYMin = 0x00,
590 kXMidYMin = 0x01,
591 kXMaxYMin = 0x02,
592 kXMinYMid = 0x04,
593 kXMidYMid = 0x05,
594 kXMaxYMid = 0x06,
595 kXMinYMax = 0x08,
596 kXMidYMax = 0x09,
597 kXMaxYMax = 0x0a,
598
599 kNone = 0x10,
600 };
601
602 enum Scale {
605 };
606
607 Align fAlign = kXMidYMid;
608 Scale fScale = kMeet;
609};
610
612public:
613 enum class Type {
614 kStart,
615 kMiddle,
616 kEnd,
617 kInherit,
618 };
619
621 explicit SkSVGTextAnchor(Type t) : fType(t) {}
622
623 bool operator==(const SkSVGTextAnchor& other) const {
624 return fType == other.fType;
625 }
626 bool operator!=(const SkSVGTextAnchor& other) const { return !(*this == other); }
627
628 Type type() const { return fType; }
629
630private:
631 Type fType;
632};
633
634// https://www.w3.org/TR/SVG11/filters.html#FilterPrimitiveInAttribute
636public:
637 enum class Type {
638 kSourceGraphic,
639 kSourceAlpha,
640 kBackgroundImage,
641 kBackgroundAlpha,
642 kFillPaint,
643 kStrokePaint,
644 kFilterPrimitiveReference,
646 };
647
649 explicit SkSVGFeInputType(Type t) : fType(t) {}
651 : fType(Type::kFilterPrimitiveReference), fId(id) {}
652
653 bool operator==(const SkSVGFeInputType& other) const {
654 return fType == other.fType && fId == other.fId;
655 }
656 bool operator!=(const SkSVGFeInputType& other) const { return !(*this == other); }
657
658 const SkString& id() const {
659 SkASSERT(fType == Type::kFilterPrimitiveReference);
660 return fId;
661 }
662
663 Type type() const { return fType; }
664
665private:
666 Type fType;
667 SkString fId;
668};
669
671 kMatrix,
672 kSaturate,
675};
676
677using SkSVGFeColorMatrixValues = std::vector<SkSVGNumberType>;
678
680 kOver,
681 kIn,
682 kOut,
683 kAtop,
684 kXor,
686};
687
689public:
690 SkSVGFeTurbulenceBaseFrequency() : fFreqX(0), fFreqY(0) {}
692 : fFreqX(freqX), fFreqY(freqY) {}
693
694 SkSVGNumberType freqX() const { return fFreqX; }
695 SkSVGNumberType freqY() const { return fFreqY; }
696
697private:
698 SkSVGNumberType fFreqX;
699 SkSVGNumberType fFreqY;
700};
701
703 enum Type {
706 };
707
709
711 explicit SkSVGFeTurbulenceType(Type type) : fType(type) {}
712};
713
714enum class SkSVGXmlSpace {
715 kDefault,
716 kPreserve,
717};
718
719enum class SkSVGColorspace {
720 kAuto,
721 kSRGB,
723};
724
725// https://www.w3.org/TR/SVG11/painting.html#DisplayProperty
726enum class SkSVGDisplay {
727 kInline,
728 kNone,
729};
730
731// https://www.w3.org/TR/SVG11/filters.html#TransferFunctionElementAttributes
732enum class SkSVGFeFuncType {
733 kIdentity,
734 kTable,
735 kDiscrete,
736 kLinear,
737 kGamma,
738};
739
740#endif // SkSVGTypes_DEFINED
#define SK_API
Definition: SkAPI.h:35
#define SkASSERT(cond)
Definition: SkAssert.h:116
@ kColor
hue and saturation of source with luminosity of destination
uint32_t SkColor
Definition: SkColor.h:37
constexpr SkColor SK_ColorBLACK
Definition: SkColor.h:103
@ kItalic
@ kNormal
glyph outlines modified to improve constrast
SkPathFillType
Definition: SkPathTypes.h:11
SkSVGDisplay
Definition: SkSVGTypes.h:726
SkSVGXmlSpace
Definition: SkSVGTypes.h:714
SkSVGLineCap
Definition: SkSVGTypes.h:288
SkSVGFeCompositeOperator
Definition: SkSVGTypes.h:679
SkSVGFeFuncType
Definition: SkSVGTypes.h:732
SkColor SkSVGColorType
Definition: SkSVGTypes.h:25
SkSVGColorspace
Definition: SkSVGTypes.h:719
std::vector< SkPoint > SkSVGPointsType
Definition: SkSVGTypes.h:31
SkSVGPropertyState
Definition: SkSVGTypes.h:33
std::vector< SkSVGNumberType > SkSVGFeColorMatrixValues
Definition: SkSVGTypes.h:677
SkScalar SkSVGNumberType
Definition: SkSVGTypes.h:27
SkSVGFeColorMatrixType
Definition: SkSVGTypes.h:670
int SkSVGIntegerType
Definition: SkSVGTypes.h:26
constexpr int kPad
GLenum type
std::vector< SkString > Vars
Definition: SkSVGTypes.h:184
SkSpan< SkString > vars()
Definition: SkSVGTypes.h:210
Type type() const
Definition: SkSVGTypes.h:205
const SkSVGColorType & color() const
Definition: SkSVGTypes.h:206
SkSVGColor & operator=(SkSVGColor &&)=default
SkSVGColor(SkSVGColor &&)=default
SkSVGColor & operator=(const SkSVGColor &)=default
SkSpan< const SkString > vars() const
Definition: SkSVGTypes.h:207
bool operator!=(const SkSVGColor &other) const
Definition: SkSVGTypes.h:203
SkSVGColor(const SkSVGColorType &c, Vars &&vars)
Definition: SkSVGTypes.h:191
SkSVGColor(Type t, Vars &&vars)
Definition: SkSVGTypes.h:188
SkSVGColor(const SkSVGColorType &c)
Definition: SkSVGTypes.h:187
SkSVGColor(const SkSVGColor &)=default
bool operator==(const SkSVGColor &other) const
Definition: SkSVGTypes.h:200
bool operator==(const SkSVGDashArray &other) const
Definition: SkSVGTypes.h:411
Type type() const
Definition: SkSVGTypes.h:416
SkSVGDashArray(Type t)
Definition: SkSVGTypes.h:403
SkSVGDashArray(const SkSVGDashArray &)=default
SkSVGDashArray(std::vector< SkSVGLength > &&dashArray)
Definition: SkSVGTypes.h:404
const std::vector< SkSVGLength > & dashArray() const
Definition: SkSVGTypes.h:418
bool operator!=(const SkSVGDashArray &other) const
Definition: SkSVGTypes.h:414
SkSVGDashArray & operator=(const SkSVGDashArray &)=default
bool operator==(const SkSVGFeInputType &other) const
Definition: SkSVGTypes.h:653
const SkString & id() const
Definition: SkSVGTypes.h:658
SkSVGFeInputType(Type t)
Definition: SkSVGTypes.h:649
bool operator!=(const SkSVGFeInputType &other) const
Definition: SkSVGTypes.h:656
SkSVGFeInputType(const SkSVGStringType &id)
Definition: SkSVGTypes.h:650
Type type() const
Definition: SkSVGTypes.h:663
SkSVGFeTurbulenceBaseFrequency(SkSVGNumberType freqX, SkSVGNumberType freqY)
Definition: SkSVGTypes.h:691
SkSVGNumberType freqX() const
Definition: SkSVGTypes.h:694
SkSVGNumberType freqY() const
Definition: SkSVGTypes.h:695
bool operator==(const SkSVGFillRule &other) const
Definition: SkSVGTypes.h:356
SkSVGFillRule & operator=(const SkSVGFillRule &)=default
SkSVGFillRule(const SkSVGFillRule &)=default
constexpr SkSVGFillRule(Type t)
Definition: SkSVGTypes.h:351
Type type() const
Definition: SkSVGTypes.h:359
bool operator!=(const SkSVGFillRule &other) const
Definition: SkSVGTypes.h:357
constexpr SkSVGFillRule()
Definition: SkSVGTypes.h:350
SkPathFillType asFillType() const
Definition: SkSVGTypes.h:361
Type type() const
Definition: SkSVGTypes.h:494
bool operator!=(const SkSVGFontFamily &other) const
Definition: SkSVGTypes.h:492
SkSVGFontFamily(const char family[])
Definition: SkSVGTypes.h:485
const SkString & family() const
Definition: SkSVGTypes.h:496
bool operator==(const SkSVGFontFamily &other) const
Definition: SkSVGTypes.h:489
SkSVGFontSize(const SkSVGLength &s)
Definition: SkSVGTypes.h:534
bool operator!=(const SkSVGFontSize &other) const
Definition: SkSVGTypes.h:541
Type type() const
Definition: SkSVGTypes.h:543
const SkSVGLength & size() const
Definition: SkSVGTypes.h:545
bool operator==(const SkSVGFontSize &other) const
Definition: SkSVGTypes.h:538
SkSVGFontStyle(Type t)
Definition: SkSVGTypes.h:513
bool operator==(const SkSVGFontStyle &other) const
Definition: SkSVGTypes.h:515
Type type() const
Definition: SkSVGTypes.h:520
bool operator!=(const SkSVGFontStyle &other) const
Definition: SkSVGTypes.h:518
SkSVGFontWeight(Type t)
Definition: SkSVGTypes.h:572
bool operator!=(const SkSVGFontWeight &other) const
Definition: SkSVGTypes.h:577
bool operator==(const SkSVGFontWeight &other) const
Definition: SkSVGTypes.h:574
Type type() const
Definition: SkSVGTypes.h:579
const SkSVGIRI & iri() const
Definition: SkSVGTypes.h:281
bool operator!=(const SkSVGFuncIRI &other) const
Definition: SkSVGTypes.h:278
SkSVGFuncIRI(SkSVGIRI &&iri)
Definition: SkSVGTypes.h:273
bool operator==(const SkSVGFuncIRI &other) const
Definition: SkSVGTypes.h:275
Type type() const
Definition: SkSVGTypes.h:280
SkSVGFuncIRI(Type t)
Definition: SkSVGTypes.h:272
const SkSVGStringType & iri() const
Definition: SkSVGTypes.h:164
Type type() const
Definition: SkSVGTypes.h:163
bool operator!=(const SkSVGIRI &other) const
Definition: SkSVGTypes.h:169
SkSVGIRI(Type t, const SkSVGStringType &iri)
Definition: SkSVGTypes.h:161
bool operator==(const SkSVGIRI &other) const
Definition: SkSVGTypes.h:166
constexpr SkSVGLength()
Definition: SkSVGTypes.h:132
bool operator!=(const SkSVGLength &other) const
Definition: SkSVGTypes.h:141
bool operator==(const SkSVGLength &other) const
Definition: SkSVGTypes.h:138
const Unit & unit() const
Definition: SkSVGTypes.h:144
SkSVGLength & operator=(const SkSVGLength &)=default
constexpr SkSVGLength(SkScalar v, Unit u=Unit::kNumber)
Definition: SkSVGTypes.h:133
SkSVGLength(const SkSVGLength &)=default
const SkScalar & value() const
Definition: SkSVGTypes.h:143
SkSVGLineJoin(const SkSVGLineJoin &)=default
SkSVGLineJoin & operator=(const SkSVGLineJoin &)=default
Type type() const
Definition: SkSVGTypes.h:312
constexpr SkSVGLineJoin()
Definition: SkSVGTypes.h:303
bool operator!=(const SkSVGLineJoin &other) const
Definition: SkSVGTypes.h:310
bool operator==(const SkSVGLineJoin &other) const
Definition: SkSVGTypes.h:309
constexpr SkSVGLineJoin(Type t)
Definition: SkSVGTypes.h:304
bool operator==(const SkSVGObjectBoundingBoxUnits &other) const
Definition: SkSVGTypes.h:464
bool operator!=(const SkSVGObjectBoundingBoxUnits &other) const
Definition: SkSVGTypes.h:467
const SkSVGColor & color() const
Definition: SkSVGTypes.h:249
SkSVGPaint(Type t)
Definition: SkSVGTypes.h:233
SkSVGPaint(const SkSVGIRI &iri, SkSVGColor fallback_color)
Definition: SkSVGTypes.h:235
SkSVGPaint(SkSVGPaint &&)=default
const SkSVGIRI & iri() const
Definition: SkSVGTypes.h:253
SkSVGPaint(SkSVGColor c)
Definition: SkSVGTypes.h:234
bool operator!=(const SkSVGPaint &other) const
Definition: SkSVGTypes.h:246
Type type() const
Definition: SkSVGTypes.h:248
SkSVGPaint(const SkSVGPaint &)=default
SkSVGPaint & operator=(SkSVGPaint &&)=default
bool operator==(const SkSVGPaint &other) const
Definition: SkSVGTypes.h:243
SkSVGPaint & operator=(const SkSVGPaint &)=default
SkSVGProperty(const T &value)
Definition: SkSVGTypes.h:48
constexpr bool isInheritable() const
Definition: SkSVGTypes.h:62
void set(const T &value)
Definition: SkSVGTypes.h:77
const T & operator*() const
Definition: SkSVGTypes.h:105
T * operator->()
Definition: SkSVGTypes.h:87
SkSVGProperty(SkSVGPropertyState state)
Definition: SkSVGTypes.h:46
bool isValue() const
Definition: SkSVGTypes.h:64
void set(T &&value)
Definition: SkSVGTypes.h:82
void set(SkSVGPropertyState state)
Definition: SkSVGTypes.h:70
SkSVGProperty(T &&value)
Definition: SkSVGTypes.h:52
T & operator*()
Definition: SkSVGTypes.h:99
T * getMaybeNull() const
Definition: SkSVGTypes.h:66
const T * operator->() const
Definition: SkSVGTypes.h:93
void init(Args &&... args)
Definition: SkSVGTypes.h:57
SkSVGSpreadMethod & operator=(const SkSVGSpreadMethod &)=default
constexpr SkSVGSpreadMethod()
Definition: SkSVGTypes.h:327
constexpr SkSVGSpreadMethod(Type t)
Definition: SkSVGTypes.h:328
bool operator!=(const SkSVGSpreadMethod &other) const
Definition: SkSVGTypes.h:334
Type type() const
Definition: SkSVGTypes.h:336
SkSVGSpreadMethod(const SkSVGSpreadMethod &)=default
bool operator==(const SkSVGSpreadMethod &other) const
Definition: SkSVGTypes.h:333
SkSVGStopColor & operator=(const SkSVGStopColor &)=default
Type type() const
Definition: SkSVGTypes.h:446
SkSVGStopColor(Type t)
Definition: SkSVGTypes.h:435
bool operator==(const SkSVGStopColor &other) const
Definition: SkSVGTypes.h:441
SkSVGStopColor(const SkSVGColorType &c)
Definition: SkSVGTypes.h:436
SkSVGStopColor(const SkSVGStopColor &)=default
const SkSVGColorType & color() const
Definition: SkSVGTypes.h:447
bool operator!=(const SkSVGStopColor &other) const
Definition: SkSVGTypes.h:444
SkSVGTextAnchor(Type t)
Definition: SkSVGTypes.h:621
Type type() const
Definition: SkSVGTypes.h:628
bool operator==(const SkSVGTextAnchor &other) const
Definition: SkSVGTypes.h:623
bool operator!=(const SkSVGTextAnchor &other) const
Definition: SkSVGTypes.h:626
SkSVGVisibility & operator=(const SkSVGVisibility &)=default
Type type() const
Definition: SkSVGTypes.h:388
bool operator!=(const SkSVGVisibility &other) const
Definition: SkSVGTypes.h:386
bool operator==(const SkSVGVisibility &other) const
Definition: SkSVGTypes.h:385
constexpr SkSVGVisibility()
Definition: SkSVGTypes.h:379
constexpr SkSVGVisibility(Type t)
Definition: SkSVGTypes.h:380
SkSVGVisibility(const SkSVGVisibility &)=default
float SkScalar
Definition: extension.cpp:12
struct MyStruct s
EMSCRIPTEN_KEEPALIVE void empty()
AtkStateType state
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
@ kDefault
uint8_t value
Definition: dart.idl:629
static int kLength
Unit(benchmark::kNanosecond)
Definition: ref_ptr.h:256
Definition: __init__.py:1
#define T
Definition: precompiler.cc:65
SkSVGFeTurbulenceType(Type type)
Definition: SkSVGTypes.h:711
const uintptr_t id