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

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

Issue 2202053002: [SVGDom/experimental] Initial SVGLength support (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: review 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
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 SkSVGAttributeParser_DEFINED
9 #define SkSVGAttributeParser_DEFINED
10
11 #include "SkSVGTypes.h"
12
13 class SkSVGAttributeParser : public SkNoncopyable {
14 public:
15 SkSVGAttributeParser(const char[]);
16
17 bool parseColor(SkSVGColor*);
18 bool parseNumber(SkSVGNumber*);
19 bool parseLength(SkSVGLength*);
20
21 private:
22 // Stack-only
23 void* operator new(size_t) = delete;
24 void* operator new(size_t, void*) = delete;
25
26 template <typename F>
27 bool advanceWhile(F func);
28
29 bool parseWSToken();
30 bool parseEOSToken();
31 bool parseSepToken();
32 bool parseExpectedStringToken(const char*);
33 bool parseScalarToken(SkScalar*);
34 bool parseHexToken(uint32_t*);
35 bool parseLengthUnitToken(SkSVGLength::Unit*);
36 bool parseNamedColorToken(SkColor*);
37 bool parseHexColorToken(SkColor*);
38
39 // The current position in the input string.
40 const char* fCurPos;
41
42 typedef SkNoncopyable INHERITED;
43 };
44
45 #endif // SkSVGAttributeParser_DEFINED
OLDNEW
« no previous file with comments | « experimental/svg/model/SkSVGAttribute.cpp ('k') | experimental/svg/model/SkSVGAttributeParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698