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

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

Issue 2246943002: [SVGDom] Add opacity support (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: pic/serialize blacklist 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 21 matching lines...) Expand all
32 SkSVGTag tag() const { return fTag; } 32 SkSVGTag tag() const { return fTag; }
33 33
34 virtual void appendChild(sk_sp<SkSVGNode>) = 0; 34 virtual void appendChild(sk_sp<SkSVGNode>) = 0;
35 35
36 void render(const SkSVGRenderContext&) const; 36 void render(const SkSVGRenderContext&) const;
37 37
38 void setAttribute(SkSVGAttribute, const SkSVGValue&); 38 void setAttribute(SkSVGAttribute, const SkSVGValue&);
39 39
40 void setFill(const SkSVGPaint&); 40 void setFill(const SkSVGPaint&);
41 void setFillOpacity(const SkSVGNumberType&); 41 void setFillOpacity(const SkSVGNumberType&);
42 void setOpacity(const SkSVGNumberType&);
42 void setStroke(const SkSVGPaint&); 43 void setStroke(const SkSVGPaint&);
43 void setStrokeOpacity(const SkSVGNumberType&); 44 void setStrokeOpacity(const SkSVGNumberType&);
44 void setStrokeWidth(const SkSVGLength&); 45 void setStrokeWidth(const SkSVGLength&);
45 46
46 protected: 47 protected:
47 SkSVGNode(SkSVGTag); 48 SkSVGNode(SkSVGTag);
48 49
49 // Called before onRender(), to apply local attributes to the context. Unli ke onRender(), 50 // Called before onRender(), to apply local attributes to the context. Unli ke onRender(),
50 // onPrepareToRender() bubbles up the inheritance chain: overriders should a lways call 51 // onPrepareToRender() bubbles up the inheritance chain: overriders should a lways call
51 // INHERITED::onPrepareToRender(), unless they intend to short-circuit rende ring 52 // INHERITED::onPrepareToRender(), unless they intend to short-circuit rende ring
52 // (return false). 53 // (return false).
53 // Implementations are expected to return true if rendering is to continue, or false if 54 // Implementations are expected to return true if rendering is to continue, or false if
54 // the node/subtree rendering is disabled. 55 // the node/subtree rendering is disabled.
55 virtual bool onPrepareToRender(SkSVGRenderContext*) const; 56 virtual bool onPrepareToRender(SkSVGRenderContext*) const;
56 57
57 virtual void onRender(const SkSVGRenderContext&) const = 0; 58 virtual void onRender(const SkSVGRenderContext&) const = 0;
58 59
59 virtual void onSetAttribute(SkSVGAttribute, const SkSVGValue&); 60 virtual void onSetAttribute(SkSVGAttribute, const SkSVGValue&);
60 61
61 private: 62 private:
62 SkSVGTag fTag; 63 SkSVGTag fTag;
63 64
64 // FIXME: this should be sparse 65 // FIXME: this should be sparse
65 SkSVGPresentationAttributes fPresentationAttributes; 66 SkSVGPresentationAttributes fPresentationAttributes;
66 67
67 typedef SkRefCnt INHERITED; 68 typedef SkRefCnt INHERITED;
68 }; 69 };
69 70
70 #endif // SkSVGNode_DEFINED 71 #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