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

Side by Side Diff: experimental/svg/model/SkSVGSVG.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 | « experimental/svg/model/SkSVGRenderContext.cpp ('k') | experimental/svg/model/SkSVGSVG.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 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
OLDNEW
« no previous file with comments | « experimental/svg/model/SkSVGRenderContext.cpp ('k') | experimental/svg/model/SkSVGSVG.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698