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

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

Issue 2202053002: [SVGDom/experimental] Initial SVGLength support (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: review Created 4 years, 4 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 | « no previous file | experimental/svg/model/SkSVGAttribute.cpp » ('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 SkSVGAttribute_DEFINED 8 #ifndef SkSVGAttribute_DEFINED
9 #define SkSVGAttribute_DEFINED 9 #define SkSVGAttribute_DEFINED
10 10
11 #include "SkColor.h" 11 #include "SkSVGTypes.h"
12 #include "SkTLazy.h" 12 #include "SkTLazy.h"
13 13
14 enum class SkSVGAttribute { 14 enum class SkSVGAttribute {
15 kD, 15 kD,
16 kFill, 16 kFill,
17 kHeight,
17 kStroke, 18 kStroke,
18 kTransform, 19 kTransform,
20 kWidth,
21 kX,
22 kY,
19 23
20 kUnknown, 24 kUnknown,
21 }; 25 };
22 26
23 class SkSVGRenderContext; 27 class SkSVGRenderContext;
24 28
25 class SkSVGPresentationAttributes { 29 class SkSVGPresentationAttributes {
26 public: 30 public:
27 SkSVGPresentationAttributes(); 31 SkSVGPresentationAttributes();
28 32
29 void setFill(SkColor); 33 void setFill(const SkSVGColor&);
30 void setStroke(SkColor); 34 void setStroke(const SkSVGColor&);
31 35
32 void applyTo(SkTCopyOnFirstWrite<SkSVGRenderContext>&) const; 36 void applyTo(SkTCopyOnFirstWrite<SkSVGRenderContext>&) const;
33 37
34 private: 38 private:
35 // Color only for now. 39 // Color only for now.
36 SkColor fFill; 40 SkSVGColor fFill;
37 SkColor fStroke; 41 SkSVGColor fStroke;
38 42
39 unsigned fFillIsSet : 1; 43 unsigned fFillIsSet : 1;
40 unsigned fStrokeIsSet : 1; 44 unsigned fStrokeIsSet : 1;
41 }; 45 };
42 46
43 #endif // SkSVGAttribute_DEFINED 47 #endif // SkSVGAttribute_DEFINED
OLDNEW
« no previous file with comments | « no previous file | experimental/svg/model/SkSVGAttribute.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698