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

Side by Side Diff: experimental/svg/model/SkSVGNode.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/SkSVGG.h ('k') | experimental/svg/model/SkSVGNode.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 SkSVGNode_DEFINED
9 #define SkSVGNode_DEFINED
10
11 #include "SkRefCnt.h"
12 #include "SkSVGAttribute.h"
13
14 class SkCanvas;
15 class SkMatrix;
16 class SkSVGRenderContext;
17 class SkSVGValue;
18
19 enum class SkSVGTag {
20 g,
21 path,
22 svg
23 };
24
25 class SkSVGNode : public SkRefCnt {
26 public:
27 virtual ~SkSVGNode();
28
29 SkSVGTag tag() const { return fTag; }
30
31 virtual void appendChild(sk_sp<SkSVGNode>) = 0;
32
33 void render(SkCanvas*) const;
34 void render(SkCanvas*, const SkSVGRenderContext&) const;
35
36 void setAttribute(SkSVGAttribute, const SkSVGValue&);
37
38 protected:
39 SkSVGNode(SkSVGTag);
40
41 virtual void onRender(SkCanvas*, const SkSVGRenderContext&) const = 0;
42
43 virtual void onSetAttribute(SkSVGAttribute, const SkSVGValue&);
44
45 virtual const SkMatrix& onLocalMatrix() const;
46
47 private:
48 SkSVGTag fTag;
49
50 // FIXME: this should be sparse
51 SkSVGPresentationAttributes fPresentationAttributes;
52
53 typedef SkRefCnt INHERITED;
54 };
55
56 #endif // SkSVGNode_DEFINED
OLDNEW
« no previous file with comments | « experimental/svg/model/SkSVGG.h ('k') | experimental/svg/model/SkSVGNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698