Chromium Code Reviews| Index: third_party/WebKit/Source/core/svg/SVGPathBuilder.h |
| diff --git a/third_party/WebKit/Source/core/svg/SVGPathBuilder.h b/third_party/WebKit/Source/core/svg/SVGPathBuilder.h |
| index 6cbe279fb5c1327aa4c667ce5fdce6158dad00c2..2dcadb58511d2c76ab8e7b813263c57590b120c7 100644 |
| --- a/third_party/WebKit/Source/core/svg/SVGPathBuilder.h |
| +++ b/third_party/WebKit/Source/core/svg/SVGPathBuilder.h |
| @@ -25,19 +25,42 @@ |
| #define SVGPathBuilder_h |
| #include "core/svg/SVGPathConsumer.h" |
| +#include "core/svg/SVGPathData.h" |
| +#include "platform/geometry/FloatPoint.h" |
| namespace blink { |
| +class FloatSize; |
| class Path; |
| class SVGPathBuilder final : public SVGPathConsumer { |
| public: |
| - SVGPathBuilder(Path& path) : m_path(path) { } |
| + SVGPathBuilder(Path& path) |
| + : m_path(path) |
| + // Starting in ClosePath state ensures correct handling of the first moveTo. |
| + , m_lastCommand(PathSegClosePath) |
| + { } |
| private: |
| void emitSegment(const PathSegmentData&) override; |
| + void emitClose(); |
| + void emitMoveTo(const FloatPoint&); |
| + void emitLineTo(const FloatPoint&); |
| + void emitQuadTo(const FloatPoint&, const FloatPoint&); |
| + void emitSmoothQuadTo(const FloatPoint&); |
| + void emitCubicTo(const FloatPoint&, const FloatPoint&, const FloatPoint&); |
| + void emitSmoothCubicTo(const FloatPoint&, const FloatPoint&); |
| + void emitArcTo(const FloatPoint&, const FloatSize&, float, bool largeArc, bool sweep); |
| + |
| + FloatPoint smoothControl(bool isSmooth) const; |
| + |
| Path& m_path; |
| + |
| + SVGPathSegType m_lastCommand; |
| + FloatPoint m_initialPoint; |
|
fs
2016/01/25 19:17:40
I recently asked for something similar to this to
f(malita)
2016/01/25 19:37:06
Done.
|
| + FloatPoint m_currentPoint; |
| + FloatPoint m_lastControlPoint; |
| }; |
| } // namespace blink |