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

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

Issue 2327233003: [SVGDom] Initial linear gradient support (Closed)
Patch Set: review Created 4 years, 3 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/SkSVGContainer.h ('k') | experimental/svg/model/SkSVGDOM.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 SkSVGDOM_DEFINED 8 #ifndef SkSVGDOM_DEFINED
9 #define SkSVGDOM_DEFINED 9 #define SkSVGDOM_DEFINED
10 10
11 #include "SkRefCnt.h" 11 #include "SkRefCnt.h"
12 #include "SkSize.h" 12 #include "SkSize.h"
13 #include "SkSVGIDMapper.h"
13 #include "SkTemplates.h" 14 #include "SkTemplates.h"
14 15
15 class SkCanvas; 16 class SkCanvas;
16 class SkDOM; 17 class SkDOM;
17 class SkStream; 18 class SkStream;
18 class SkSVGNode; 19 class SkSVGNode;
19 20
20 class SkSVGDOM : public SkRefCnt { 21 class SkSVGDOM : public SkRefCnt {
21 public: 22 public:
22 SkSVGDOM(const SkSize& containerSize); 23 SkSVGDOM(const SkSize& containerSize);
23 ~SkSVGDOM() = default; 24 ~SkSVGDOM() = default;
24 25
25 static sk_sp<SkSVGDOM> MakeFromDOM(const SkDOM&, const SkSize& containerSize ); 26 static sk_sp<SkSVGDOM> MakeFromDOM(const SkDOM&, const SkSize& containerSize );
26 static sk_sp<SkSVGDOM> MakeFromStream(SkStream&, const SkSize& containerSize ); 27 static sk_sp<SkSVGDOM> MakeFromStream(SkStream&, const SkSize& containerSize );
27 28
28 void setContainerSize(const SkSize&); 29 void setContainerSize(const SkSize&);
29 void setRoot(sk_sp<SkSVGNode>); 30 void setRoot(sk_sp<SkSVGNode>);
30 31
31 void render(SkCanvas*) const; 32 void render(SkCanvas*) const;
32 33
33 private: 34 private:
34 SkSize fContainerSize; 35 SkSize fContainerSize;
35 sk_sp<SkSVGNode> fRoot; 36 sk_sp<SkSVGNode> fRoot;
37 SkSVGIDMapper fIDMapper;
36 38
37 typedef SkRefCnt INHERITED; 39 typedef SkRefCnt INHERITED;
38 }; 40 };
39 41
40 #endif // SkSVGDOM_DEFINED 42 #endif // SkSVGDOM_DEFINED
OLDNEW
« no previous file with comments | « experimental/svg/model/SkSVGContainer.h ('k') | experimental/svg/model/SkSVGDOM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698