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

Unified Diff: third_party/WebKit/Source/core/svg/SVGPathParser.h

Issue 1472853005: Expose the SVG path normalizer in SVGPathParser.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use regular raw ptr. Created 5 years, 1 month 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 | third_party/WebKit/Source/core/svg/SVGPathParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGPathParser.h
diff --git a/third_party/WebKit/Source/core/svg/SVGPathParser.h b/third_party/WebKit/Source/core/svg/SVGPathParser.h
index 61c9e0ca86b1962524052d6c436bc3dcf21fada1..f5f78d24135ae410a7adecab2d0caae074ed915b 100644
--- a/third_party/WebKit/Source/core/svg/SVGPathParser.h
+++ b/third_party/WebKit/Source/core/svg/SVGPathParser.h
@@ -70,6 +70,28 @@ private:
SVGPathConsumer* m_consumer;
};
+class SVGPathNormalizer {
+ STACK_ALLOCATED();
+public:
+ SVGPathNormalizer(SVGPathConsumer* consumer)
+ : m_consumer(consumer)
+ , m_lastCommand(PathSegUnknown)
+ {
+ ASSERT(m_consumer);
+ }
+
+ void emitSegment(const PathSegmentData&);
+
+private:
+ bool decomposeArcToCubic(const FloatPoint& currentPoint, const PathSegmentData&);
+
+ SVGPathConsumer* m_consumer;
+ FloatPoint m_controlPoint;
+ FloatPoint m_currentPoint;
+ FloatPoint m_subPathPoint;
+ SVGPathSegType m_lastCommand;
+};
+
} // namespace blink
#endif // SVGPathParser_h
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGPathParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698