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

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

Issue 2235273003: [SVGDom] <polygon> & <polyline> support (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: GN build fix 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/SkSVGNode.h ('k') | experimental/svg/model/SkSVGPoly.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 SkSVGPoly_DEFINED
9 #define SkSVGPoly_DEFINED
10
11 #include "SkPath.h"
12 #include "SkSVGShape.h"
13
14 // Handles <polygon> and <polyline> elements.
15 class SkSVGPoly final : public SkSVGShape {
16 public:
17 virtual ~SkSVGPoly() = default;
18
19 static sk_sp<SkSVGPoly> MakePolygon() {
20 return sk_sp<SkSVGPoly>(new SkSVGPoly(SkSVGTag::kPolygon));
21 }
22
23 static sk_sp<SkSVGPoly> MakePolyline() {
24 return sk_sp<SkSVGPoly>(new SkSVGPoly(SkSVGTag::kPolyline));
25 }
26
27 void setPoints(const SkSVGPointsType&);
28
29 protected:
30 void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override;
31
32 void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&) const over ride;
33
34 private:
35 SkSVGPoly(SkSVGTag);
36
37 SkPath fPath;
38
39 typedef SkSVGShape INHERITED;
40 };
41
42 #endif // SkSVGPoly_DEFINED
OLDNEW
« no previous file with comments | « experimental/svg/model/SkSVGNode.h ('k') | experimental/svg/model/SkSVGPoly.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698