| 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 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 |
| OLD | NEW |