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

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

Issue 2243853003: [SVGDom] SVGPong sample app (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/SkSVGDOM.cpp ('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
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 SkSVGNode_DEFINED 8 #ifndef SkSVGNode_DEFINED
9 #define SkSVGNode_DEFINED 9 #define SkSVGNode_DEFINED
10 10
(...skipping 17 matching lines...) Expand all
28 virtual ~SkSVGNode(); 28 virtual ~SkSVGNode();
29 29
30 SkSVGTag tag() const { return fTag; } 30 SkSVGTag tag() const { return fTag; }
31 31
32 virtual void appendChild(sk_sp<SkSVGNode>) = 0; 32 virtual void appendChild(sk_sp<SkSVGNode>) = 0;
33 33
34 void render(const SkSVGRenderContext&) const; 34 void render(const SkSVGRenderContext&) const;
35 35
36 void setAttribute(SkSVGAttribute, const SkSVGValue&); 36 void setAttribute(SkSVGAttribute, const SkSVGValue&);
37 37
38 void setFill(const SkSVGPaint&);
39 void setFillOpacity(const SkSVGNumberType&);
40 void setStroke(const SkSVGPaint&);
41 void setStrokeOpacity(const SkSVGNumberType&);
42 void setStrokeWidth(const SkSVGLength&);
43
38 protected: 44 protected:
39 SkSVGNode(SkSVGTag); 45 SkSVGNode(SkSVGTag);
40 46
41 // Called before onRender(), to apply local attributes to the context. Unli ke onRender(), 47 // Called before onRender(), to apply local attributes to the context. Unli ke onRender(),
42 // onPrepareToRender() bubbles up the inheritance chain: overriders should a lways call 48 // onPrepareToRender() bubbles up the inheritance chain: overriders should a lways call
43 // INHERITED::onPrepareToRender(), unless they intend to short-circuit rende ring 49 // INHERITED::onPrepareToRender(), unless they intend to short-circuit rende ring
44 // (return false). 50 // (return false).
45 // Implementations are expected to return true if rendering is to continue, or false if 51 // Implementations are expected to return true if rendering is to continue, or false if
46 // the node/subtree rendering is disabled. 52 // the node/subtree rendering is disabled.
47 virtual bool onPrepareToRender(SkSVGRenderContext*) const; 53 virtual bool onPrepareToRender(SkSVGRenderContext*) const;
48 54
49 virtual void onRender(const SkSVGRenderContext&) const = 0; 55 virtual void onRender(const SkSVGRenderContext&) const = 0;
50 56
51 virtual void onSetAttribute(SkSVGAttribute, const SkSVGValue&); 57 virtual void onSetAttribute(SkSVGAttribute, const SkSVGValue&);
52 58
53 private: 59 private:
54 SkSVGTag fTag; 60 SkSVGTag fTag;
55 61
56 // FIXME: this should be sparse 62 // FIXME: this should be sparse
57 SkSVGPresentationAttributes fPresentationAttributes; 63 SkSVGPresentationAttributes fPresentationAttributes;
58 64
59 typedef SkRefCnt INHERITED; 65 typedef SkRefCnt INHERITED;
60 }; 66 };
61 67
62 #endif // SkSVGNode_DEFINED 68 #endif // SkSVGNode_DEFINED
OLDNEW
« no previous file with comments | « experimental/svg/model/SkSVGDOM.cpp ('k') | experimental/svg/model/SkSVGNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698