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

Unified Diff: experimental/svg/model/SkSVGAttributeParser.h

Issue 2220933003: [SVGDom] Improved transform parsing (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | experimental/svg/model/SkSVGAttributeParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/svg/model/SkSVGAttributeParser.h
diff --git a/experimental/svg/model/SkSVGAttributeParser.h b/experimental/svg/model/SkSVGAttributeParser.h
index cd50479fee125ecf5a1a73b9ecdcaa0952ec25ad..c616113d6b4fa0bae892d79a6a955bb6a4a45afc 100644
--- a/experimental/svg/model/SkSVGAttributeParser.h
+++ b/experimental/svg/model/SkSVGAttributeParser.h
@@ -18,6 +18,7 @@ public:
bool parseNumber(SkSVGNumberType*);
bool parseLength(SkSVGLength*);
bool parseViewBox(SkSVGViewBoxType*);
+ bool parseTransform(SkSVGTransformType*);
private:
// Stack-only
@@ -37,6 +38,19 @@ private:
bool parseNamedColorToken(SkColor*);
bool parseHexColorToken(SkColor*);
+ // Transform helpers
+ bool parseMatrixToken(SkMatrix*);
+ bool parseTranslateToken(SkMatrix*);
+ bool parseScaleToken(SkMatrix*);
+ bool parseRotateToken(SkMatrix*);
+ bool parseSkewXToken(SkMatrix*);
+ bool parseSkewYToken(SkMatrix*);
+
+ // Parses a sequence of 'WS* <prefix> WS* (<nested>)', where the nested sequence
+ // is handled by the passed functor.
+ template <typename Func, typename T>
+ bool parseParenthesized(const char* prefix, Func, T* result);
+
// The current position in the input string.
const char* fCurPos;
« no previous file with comments | « no previous file | experimental/svg/model/SkSVGAttributeParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698