diff options
Diffstat (limited to 'experimental/svg/model/SkSVGTypes.h')
-rw-r--r-- | experimental/svg/model/SkSVGTypes.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/experimental/svg/model/SkSVGTypes.h b/experimental/svg/model/SkSVGTypes.h index c83fd7d10b..4a300b6e3c 100644 --- a/experimental/svg/model/SkSVGTypes.h +++ b/experimental/svg/model/SkSVGTypes.h @@ -248,4 +248,28 @@ private: Type fType; }; +class SkSVGVisibility { +public: + enum class Type { + kVisible, + kHidden, + kCollapse, + kInherit, + }; + + constexpr SkSVGVisibility() : fType(Type::kVisible) {} + constexpr explicit SkSVGVisibility(Type t) : fType(t) {} + + SkSVGVisibility(const SkSVGVisibility&) = default; + SkSVGVisibility& operator=(const SkSVGVisibility&) = default; + + bool operator==(const SkSVGVisibility& other) const { return fType == other.fType; } + bool operator!=(const SkSVGVisibility& other) const { return !(*this == other); } + + Type type() const { return fType; } + +private: + Type fType; +}; + #endif // SkSVGTypes_DEFINED |