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

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

Issue 2244223005: [SVGDom] Add <line> support (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: rebase 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/SkSVGLine.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 SkSVGLine_DEFINED
9 #define SkSVGLine_DEFINED
10
11 #include "SkSVGShape.h"
12 #include "SkSVGTypes.h"
13
14 class SkSVGLine final : public SkSVGShape {
15 public:
16 virtual ~SkSVGLine() = default;
17 static sk_sp<SkSVGLine> Make() { return sk_sp<SkSVGLine>(new SkSVGLine()); }
18
19 void setX1(const SkSVGLength&);
20 void setY1(const SkSVGLength&);
21 void setX2(const SkSVGLength&);
22 void setY2(const SkSVGLength&);
23
24 protected:
25 void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override;
26
27 void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&) const over ride;
28
29 private:
30 SkSVGLine();
31
32 SkSVGLength fX1 = SkSVGLength(0);
33 SkSVGLength fY1 = SkSVGLength(0);
34 SkSVGLength fX2 = SkSVGLength(0);
35 SkSVGLength fY2 = SkSVGLength(0);
36
37 typedef SkSVGShape INHERITED;
38 };
39
40 #endif // SkSVGLine_DEFINED
OLDNEW
« no previous file with comments | « experimental/svg/model/SkSVGDOM.cpp ('k') | experimental/svg/model/SkSVGLine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698