SVGPathSegListBuilder.h [plain text]
#ifndef SVGPathSegListBuilder_h
#define SVGPathSegListBuilder_h
#if ENABLE(SVG)
#include "FloatPoint.h"
#include "SVGPathConsumer.h"
#include "SVGPathElement.h"
#include "SVGPathSegList.h"
namespace WebCore {
class SVGPathSegListBuilder : public SVGPathConsumer {
public:
SVGPathSegListBuilder();
void setCurrentSVGPathElement(SVGPathElement* pathElement) { m_pathElement = pathElement; }
void setCurrentSVGPathSegList(SVGPathSegList& pathSegList) { m_pathSegList = &pathSegList; }
void setCurrentSVGPathSegRole(SVGPathSegRole pathSegRole) { m_pathSegRole = pathSegRole; }
private:
virtual void incrementPathSegmentCount() { }
virtual bool continueConsuming() { return true; }
virtual void cleanup()
{
m_pathElement = 0;
m_pathSegList = 0;
m_pathSegRole = PathSegUndefinedRole;
}
virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode);
virtual void lineTo(const FloatPoint&, PathCoordinateMode);
virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode);
virtual void closePath();
virtual void lineToHorizontal(float, PathCoordinateMode);
virtual void lineToVertical(float, PathCoordinateMode);
virtual void curveToCubicSmooth(const FloatPoint&, const FloatPoint&, PathCoordinateMode);
virtual void curveToQuadratic(const FloatPoint&, const FloatPoint&, PathCoordinateMode);
virtual void curveToQuadraticSmooth(const FloatPoint&, PathCoordinateMode);
virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const FloatPoint&, PathCoordinateMode);
SVGPathElement* m_pathElement;
SVGPathSegList* m_pathSegList;
SVGPathSegRole m_pathSegRole;
};
}
#endif // ENABLE(SVG)
#endif // SVGPathSegListBuilder_h