Chromium Code Reviews| Index: experimental/svg/model/SkSVGTypes.h |
| diff --git a/experimental/svg/model/SkSVGTypes.h b/experimental/svg/model/SkSVGTypes.h |
| index b2343a15e4ea996b49879c89b0775f329efddb27..b88ac154951c46345326d444b2c0da4cc7a35f39 100644 |
| --- a/experimental/svg/model/SkSVGTypes.h |
| +++ b/experimental/svg/model/SkSVGTypes.h |
| @@ -167,4 +167,27 @@ private: |
| Type fType; |
| }; |
| +class SkSVGSpreadMethod { |
| +public: |
|
robertphillips
2016/09/13 18:16:53
// These enum values must match those in Skia's Ti
f(malita)
2016/09/13 18:26:01
Done.
|
| + enum class Type { |
| + kPad, // kClamp_TileMode |
| + kRepeat, // kRepeat_TileMode |
| + kReflect, // kMirror_TileMode |
| + }; |
| + |
| + constexpr SkSVGSpreadMethod() : fType(Type::kPad) {} |
| + constexpr explicit SkSVGSpreadMethod(Type t) : fType(t) {} |
| + |
| + SkSVGSpreadMethod(const SkSVGSpreadMethod&) = default; |
| + SkSVGSpreadMethod& operator=(const SkSVGSpreadMethod&) = default; |
| + |
| + bool operator==(const SkSVGSpreadMethod& other) const { return fType == other.fType; } |
| + bool operator!=(const SkSVGSpreadMethod& other) const { return !(*this == other); } |
| + |
| + Type type() const { return fType; } |
| + |
| +private: |
| + Type fType; |
| +}; |
| + |
| #endif // SkSVGTypes_DEFINED |