SVGPathStringBuilder.h [plain text]
#ifndef SVGPathStringBuilder_h
#define SVGPathStringBuilder_h
#include "SVGPathConsumer.h"
#include <wtf/text/StringBuilder.h>
namespace WebCore {
class SVGPathStringBuilder final : public SVGPathConsumer {
public:
SVGPathStringBuilder();
~SVGPathStringBuilder();
String result();
private:
virtual void cleanup() override;
virtual void incrementPathSegmentCount() override;
virtual bool continueConsuming() override;
virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode) override;
virtual void lineTo(const FloatPoint&, PathCoordinateMode) override;
virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode) override;
virtual void closePath() override;
virtual void lineToHorizontal(float, PathCoordinateMode) override;
virtual void lineToVertical(float, PathCoordinateMode) override;
virtual void curveToCubicSmooth(const FloatPoint&, const FloatPoint&, PathCoordinateMode) override;
virtual void curveToQuadratic(const FloatPoint&, const FloatPoint&, PathCoordinateMode) override;
virtual void curveToQuadraticSmooth(const FloatPoint&, PathCoordinateMode) override;
virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const FloatPoint&, PathCoordinateMode) override;
StringBuilder m_stringBuilder;
};
}
#endif // SVGPathStringBuilder_h