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

Side by Side Diff: experimental/svg/model/SkSVGPath.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/SkSVGNode.cpp ('k') | experimental/svg/model/SkSVGPath.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 SkSVGPath_DEFINED 8 #ifndef SkSVGPath_DEFINED
9 #define SkSVGPath_DEFINED 9 #define SkSVGPath_DEFINED
10 10
11 #include "SkPath.h" 11 #include "SkPath.h"
12 #include "SkSVGTransformableNode.h" 12 #include "SkSVGShape.h"
13 13
14 class SkSVGPath final : public SkSVGTransformableNode { 14 class SkSVGPath final : public SkSVGShape {
15 public: 15 public:
16 virtual ~SkSVGPath() = default; 16 virtual ~SkSVGPath() = default;
17 static sk_sp<SkSVGPath> Make() { return sk_sp<SkSVGPath>(new SkSVGPath()); } 17 static sk_sp<SkSVGPath> Make() { return sk_sp<SkSVGPath>(new SkSVGPath()); }
18 18
19 void appendChild(sk_sp<SkSVGNode>) override { }
20
21 void setPath(const SkPath& path) { fPath = path; } 19 void setPath(const SkPath& path) { fPath = path; }
22 20
23 protected: 21 protected:
24 void onRender(SkCanvas*, const SkSVGRenderContext&) const override; 22 void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override;
25 23
26 void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override; 24 void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&) const over ride;
27 25
28 private: 26 private:
29 SkSVGPath(); 27 SkSVGPath();
30 28
31 void doRender(SkCanvas*, const SkPaint*) const;
32
33 SkPath fPath; 29 SkPath fPath;
34 30
35 typedef SkSVGTransformableNode INHERITED; 31 typedef SkSVGShape INHERITED;
36 }; 32 };
37 33
38 #endif // SkSVGPath_DEFINED 34 #endif // SkSVGPath_DEFINED
OLDNEW
« no previous file with comments | « experimental/svg/model/SkSVGNode.cpp ('k') | experimental/svg/model/SkSVGPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698