| 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..522bee4be769ae45792de594e70f13fd33d6a58c 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_subpathPoint;
|
| + FloatPoint m_currentPoint;
|
| + FloatPoint m_lastControlPoint;
|
| };
|
|
|
| } // namespace blink
|
|
|