| 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 SkSVGSVG_DEFINED | 8 #ifndef SkSVGSVG_DEFINED |
| 9 #define SkSVGSVG_DEFINED | 9 #define SkSVGSVG_DEFINED |
| 10 | 10 |
| 11 #include "SkSVGContainer.h" | 11 #include "SkSVGContainer.h" |
| 12 #include "SkSVGTypes.h" |
| 12 | 13 |
| 13 class SkSVGSVG : public SkSVGContainer { | 14 class SkSVGSVG : public SkSVGContainer { |
| 14 public: | 15 public: |
| 15 virtual ~SkSVGSVG() = default; | 16 virtual ~SkSVGSVG() = default; |
| 16 | 17 |
| 17 static sk_sp<SkSVGSVG> Make() { return sk_sp<SkSVGSVG>(new SkSVGSVG()); } | 18 static sk_sp<SkSVGSVG> Make() { return sk_sp<SkSVGSVG>(new SkSVGSVG()); } |
| 18 | 19 |
| 20 void setX(const SkSVGLength&); |
| 21 void setY(const SkSVGLength&); |
| 22 void setWidth(const SkSVGLength&); |
| 23 void setHeight(const SkSVGLength&); |
| 24 |
| 25 protected: |
| 26 void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override; |
| 27 |
| 19 private: | 28 private: |
| 20 SkSVGSVG(); | 29 SkSVGSVG(); |
| 21 | 30 |
| 31 SkSVGLength fX = SkSVGLength(0); |
| 32 SkSVGLength fY = SkSVGLength(0); |
| 33 SkSVGLength fWidth = SkSVGLength(100, SkSVGLength::Unit::kPercentage); |
| 34 SkSVGLength fHeight = SkSVGLength(100, SkSVGLength::Unit::kPercentage); |
| 35 |
| 22 typedef SkSVGContainer INHERITED; | 36 typedef SkSVGContainer INHERITED; |
| 23 }; | 37 }; |
| 24 | 38 |
| 25 #endif // SkSVGSVG_DEFINED | 39 #endif // SkSVGSVG_DEFINED |
| OLD | NEW |