Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: experimental/svg/model/SkSVGTypes.h

Issue 2337203002: [SVGDom] Linear gradient 'spreadMethod' support (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « experimental/svg/model/SkSVGLinearGradient.cpp ('k') | experimental/svg/model/SkSVGValue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « experimental/svg/model/SkSVGLinearGradient.cpp ('k') | experimental/svg/model/SkSVGValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698