OLD | NEW |
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 SkSVGAttributeParser_DEFINED | 8 #ifndef SkSVGAttributeParser_DEFINED |
9 #define SkSVGAttributeParser_DEFINED | 9 #define SkSVGAttributeParser_DEFINED |
10 | 10 |
11 #include "SkSVGTypes.h" | 11 #include "SkSVGTypes.h" |
12 | 12 |
13 class SkSVGAttributeParser : public SkNoncopyable { | 13 class SkSVGAttributeParser : public SkNoncopyable { |
14 public: | 14 public: |
15 SkSVGAttributeParser(const char[]); | 15 SkSVGAttributeParser(const char[]); |
16 | 16 |
17 bool parseColor(SkSVGColorType*); | 17 bool parseColor(SkSVGColorType*); |
18 bool parseNumber(SkSVGNumberType*); | 18 bool parseNumber(SkSVGNumberType*); |
19 bool parseLength(SkSVGLength*); | 19 bool parseLength(SkSVGLength*); |
20 bool parseViewBox(SkSVGViewBoxType*); | 20 bool parseViewBox(SkSVGViewBoxType*); |
21 bool parseTransform(SkSVGTransformType*); | 21 bool parseTransform(SkSVGTransformType*); |
| 22 bool parsePaint(SkSVGPaint*); |
| 23 bool parseLineCap(SkSVGLineCap*); |
| 24 bool parseLineJoin(SkSVGLineJoin*); |
22 | 25 |
23 private: | 26 private: |
24 // Stack-only | 27 // Stack-only |
25 void* operator new(size_t) = delete; | 28 void* operator new(size_t) = delete; |
26 void* operator new(size_t, void*) = delete; | 29 void* operator new(size_t, void*) = delete; |
27 | 30 |
28 template <typename F> | 31 template <typename F> |
29 bool advanceWhile(F func); | 32 bool advanceWhile(F func); |
30 | 33 |
31 bool parseWSToken(); | 34 bool parseWSToken(); |
(...skipping 19 matching lines...) Expand all Loading... |
51 template <typename Func, typename T> | 54 template <typename Func, typename T> |
52 bool parseParenthesized(const char* prefix, Func, T* result); | 55 bool parseParenthesized(const char* prefix, Func, T* result); |
53 | 56 |
54 // The current position in the input string. | 57 // The current position in the input string. |
55 const char* fCurPos; | 58 const char* fCurPos; |
56 | 59 |
57 typedef SkNoncopyable INHERITED; | 60 typedef SkNoncopyable INHERITED; |
58 }; | 61 }; |
59 | 62 |
60 #endif // SkSVGAttributeParser_DEFINED | 63 #endif // SkSVGAttributeParser_DEFINED |
OLD | NEW |