Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkSVGTypes_DEFINED | 8 #ifndef SkSVGTypes_DEFINED |
| 9 #define SkSVGTypes_DEFINED | 9 #define SkSVGTypes_DEFINED |
| 10 | 10 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 | 160 |
| 161 bool operator==(const SkSVGLineJoin& other) const { return fType == other.fT ype; } | 161 bool operator==(const SkSVGLineJoin& other) const { return fType == other.fT ype; } |
| 162 bool operator!=(const SkSVGLineJoin& other) const { return !(*this == other) ; } | 162 bool operator!=(const SkSVGLineJoin& other) const { return !(*this == other) ; } |
| 163 | 163 |
| 164 Type type() const { return fType; } | 164 Type type() const { return fType; } |
| 165 | 165 |
| 166 private: | 166 private: |
| 167 Type fType; | 167 Type fType; |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 class SkSVGSpreadMethod { | |
| 171 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.
| |
| 172 enum class Type { | |
| 173 kPad, // kClamp_TileMode | |
| 174 kRepeat, // kRepeat_TileMode | |
| 175 kReflect, // kMirror_TileMode | |
| 176 }; | |
| 177 | |
| 178 constexpr SkSVGSpreadMethod() : fType(Type::kPad) {} | |
| 179 constexpr explicit SkSVGSpreadMethod(Type t) : fType(t) {} | |
| 180 | |
| 181 SkSVGSpreadMethod(const SkSVGSpreadMethod&) = default; | |
| 182 SkSVGSpreadMethod& operator=(const SkSVGSpreadMethod&) = default; | |
| 183 | |
| 184 bool operator==(const SkSVGSpreadMethod& other) const { return fType == othe r.fType; } | |
| 185 bool operator!=(const SkSVGSpreadMethod& other) const { return !(*this == ot her); } | |
| 186 | |
| 187 Type type() const { return fType; } | |
| 188 | |
| 189 private: | |
| 190 Type fType; | |
| 191 }; | |
| 192 | |
| 170 #endif // SkSVGTypes_DEFINED | 193 #endif // SkSVGTypes_DEFINED |
| OLD | NEW |