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

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

Issue 2234863002: [SVGDom] Add rx/ry support for <rect> (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: comments 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/SkSVGDOM.cpp ('k') | experimental/svg/model/SkSVGRect.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 SkSVGRect_DEFINED 8 #ifndef SkSVGRect_DEFINED
9 #define SkSVGRect_DEFINED 9 #define SkSVGRect_DEFINED
10 10
11 #include "SkSVGShape.h" 11 #include "SkSVGShape.h"
12 #include "SkSVGTypes.h" 12 #include "SkSVGTypes.h"
13 13
14 class SkSVGRect final : public SkSVGShape { 14 class SkSVGRect final : public SkSVGShape {
15 public: 15 public:
16 virtual ~SkSVGRect() = default; 16 virtual ~SkSVGRect() = default;
17 static sk_sp<SkSVGRect> Make() { return sk_sp<SkSVGRect>(new SkSVGRect()); } 17 static sk_sp<SkSVGRect> Make() { return sk_sp<SkSVGRect>(new SkSVGRect()); }
18 18
19 void setX(const SkSVGLength&); 19 void setX(const SkSVGLength&);
20 void setY(const SkSVGLength&); 20 void setY(const SkSVGLength&);
21 void setWidth(const SkSVGLength&); 21 void setWidth(const SkSVGLength&);
22 void setHeight(const SkSVGLength&); 22 void setHeight(const SkSVGLength&);
23 void setRx(const SkSVGLength&);
24 void setRy(const SkSVGLength&);
23 25
24 protected: 26 protected:
25 void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override; 27 void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override;
26 28
27 void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&) const over ride; 29 void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&) const over ride;
28 30
29 private: 31 private:
30 SkSVGRect(); 32 SkSVGRect();
31 33
32 SkSVGLength fX = SkSVGLength(0); 34 SkSVGLength fX = SkSVGLength(0);
33 SkSVGLength fY = SkSVGLength(0); 35 SkSVGLength fY = SkSVGLength(0);
34 SkSVGLength fWidth = SkSVGLength(0); 36 SkSVGLength fWidth = SkSVGLength(0);
35 SkSVGLength fHeight = SkSVGLength(0); 37 SkSVGLength fHeight = SkSVGLength(0);
36 38
39 // The x radius for rounded rects.
40 SkSVGLength fRx = SkSVGLength(0);
41 // The y radius for rounded rects.
42 SkSVGLength fRy = SkSVGLength(0);
43
37 typedef SkSVGShape INHERITED; 44 typedef SkSVGShape INHERITED;
38 }; 45 };
39 46
40 #endif // SkSVGRect_DEFINED 47 #endif // SkSVGRect_DEFINED
OLDNEW
« no previous file with comments | « experimental/svg/model/SkSVGDOM.cpp ('k') | experimental/svg/model/SkSVGRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698