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

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

Issue 2164193002: Initial SVG model (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: warning fix 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
(Empty)
1 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkSVGPath_DEFINED
9 #define SkSVGPath_DEFINED
10
11 #include "SkPath.h"
12 #include "SkSVGTransformableNode.h"
13
14 class SkSVGPath final : public SkSVGTransformableNode {
15 public:
16 virtual ~SkSVGPath() = default;
17 static sk_sp<SkSVGPath> Make() { return sk_sp<SkSVGPath>(new SkSVGPath()); }
18
19 void appendChild(sk_sp<SkSVGNode>) override { }
20
21 void setPath(const SkPath& path) { fPath = path; }
22
23 protected:
24 void onRender(SkCanvas*, const SkSVGRenderContext&) const override;
25
26 void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override;
27
28 private:
29 SkSVGPath();
30
31 void doRender(SkCanvas*, const SkPaint*) const;
32
33 SkPath fPath;
34
35 typedef SkSVGTransformableNode INHERITED;
36 };
37
38 #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