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*); | 22 bool parsePaint(SkSVGPaint*); |
23 bool parseLineCap(SkSVGLineCap*); | 23 bool parseLineCap(SkSVGLineCap*); |
24 bool parseLineJoin(SkSVGLineJoin*); | 24 bool parseLineJoin(SkSVGLineJoin*); |
25 bool parsePoints(SkSVGPointsType*); | 25 bool parsePoints(SkSVGPointsType*); |
26 bool parseIRI(SkSVGStringType*); | 26 bool parseIRI(SkSVGStringType*); |
| 27 bool parseSpreadMethod(SkSVGSpreadMethod*); |
27 | 28 |
28 private: | 29 private: |
29 // Stack-only | 30 // Stack-only |
30 void* operator new(size_t) = delete; | 31 void* operator new(size_t) = delete; |
31 void* operator new(size_t, void*) = delete; | 32 void* operator new(size_t, void*) = delete; |
32 | 33 |
33 template <typename F> | 34 template <typename F> |
34 bool advanceWhile(F func); | 35 bool advanceWhile(F func); |
35 | 36 |
36 bool parseWSToken(); | 37 bool parseWSToken(); |
(...skipping 22 matching lines...) Expand all Loading... |
59 template <typename Func, typename T> | 60 template <typename Func, typename T> |
60 bool parseParenthesized(const char* prefix, Func, T* result); | 61 bool parseParenthesized(const char* prefix, Func, T* result); |
61 | 62 |
62 // The current position in the input string. | 63 // The current position in the input string. |
63 const char* fCurPos; | 64 const char* fCurPos; |
64 | 65 |
65 typedef SkNoncopyable INHERITED; | 66 typedef SkNoncopyable INHERITED; |
66 }; | 67 }; |
67 | 68 |
68 #endif // SkSVGAttributeParser_DEFINED | 69 #endif // SkSVGAttributeParser_DEFINED |
OLD | NEW |