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

Side by Side Diff: experimental/svg/model/SkSVGStop.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/SkSVGRenderContext.cpp ('k') | experimental/svg/model/SkSVGStop.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 SkSVGStop_DEFINED
9 #define SkSVGStop_DEFINED
10
11 #include "SkSVGHiddenContainer.h"
12 #include "SkSVGTypes.h"
13
14 class SkSVGLengthContext;
15
16 class SkSVGStop : public SkSVGHiddenContainer {
17 public:
18 virtual ~SkSVGStop() = default;
19 static sk_sp<SkSVGStop> Make() {
20 return sk_sp<SkSVGStop>(new SkSVGStop());
21 }
22
23 const SkSVGLength& offset() const { return fOffset; }
24 const SkSVGColorType& stopColor() const { return fStopColor; }
25 const SkSVGNumberType& stopOpacity() const { return fStopOpacity; }
26
27 void setOffset(const SkSVGLength&);
28 void setStopColor(const SkSVGColorType&);
29 void setStopOpacity(const SkSVGNumberType&);
30
31 protected:
32 void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override;
33
34 private:
35 SkSVGStop();
36
37 SkSVGLength fOffset = SkSVGLength(0 , SkSVGLength::Unit::kPercenta ge);
38 SkSVGColorType fStopColor = SkSVGColorType(SK_ColorBLACK);
39 SkSVGNumberType fStopOpacity = SkSVGNumberType(1);
40
41 typedef SkSVGHiddenContainer INHERITED;
42 };
43
44 #endif // SkSVGStop_DEFINED
OLDNEW
« no previous file with comments | « experimental/svg/model/SkSVGRenderContext.cpp ('k') | experimental/svg/model/SkSVGStop.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698