diff options
Diffstat (limited to 'experimental/svg/model/SkSVGTypes.h')
-rw-r--r-- | experimental/svg/model/SkSVGTypes.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/experimental/svg/model/SkSVGTypes.h b/experimental/svg/model/SkSVGTypes.h index b07f9a2c8c..d5d2b7146f 100644 --- a/experimental/svg/model/SkSVGTypes.h +++ b/experimental/svg/model/SkSVGTypes.h @@ -191,4 +191,27 @@ private: Type fType; }; +class SkSVGFillRule { +public: + enum class Type { + kNonZero, + kEvenOdd, + kInherit, + }; + + constexpr SkSVGFillRule() : fType(Type::kInherit) {} + constexpr explicit SkSVGFillRule(Type t) : fType(t) {} + + SkSVGFillRule(const SkSVGFillRule&) = default; + SkSVGFillRule& operator=(const SkSVGFillRule&) = default; + + bool operator==(const SkSVGFillRule& other) const { return fType == other.fType; } + bool operator!=(const SkSVGFillRule& other) const { return !(*this == other); } + + Type type() const { return fType; } + +private: + Type fType; +}; + #endif // SkSVGTypes_DEFINED |