#ifndef RenderPath_h
#define RenderPath_h
#if ENABLE(SVG)
#include "AffineTransform.h"
#include "FloatRect.h"
#include "RenderObject.h"
namespace WebCore {
class FloatPoint;
class Path;
class RenderSVGContainer;
class SVGStyledElement;
class RenderPath : public RenderObject
{
public:
RenderPath(RenderStyle* style, SVGStyledElement *node);
virtual ~RenderPath();
virtual bool fillContains(const FloatPoint&, bool requiresFill = true) const;
virtual bool strokeContains(const FloatPoint&, bool requiresStroke = true) const;
virtual FloatRect relativeBBox(bool includeStroke = true) const;
const Path& path() const;
void setPath(const Path& newPath);
virtual bool isRenderPath() const { return true; }
virtual const char* renderName() const { return "RenderPath"; }
virtual AffineTransform localTransform() const;
virtual void setLocalTransform(const AffineTransform& matrix);
virtual void layout();
virtual IntRect absoluteClippedOverflowRect();
virtual bool requiresLayer();
virtual short lineHeight(bool b, bool isRootLineBox = false) const;
virtual short baselinePosition(bool b, bool isRootLineBox = false) const;
virtual void paint(PaintInfo&, int parentX, int parentY);
virtual void absoluteRects(Vector<IntRect>&, int tx, int ty, bool topLevel = true);
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
FloatRect drawMarkersIfNeeded(GraphicsContext*, const FloatRect&, const Path&) const;
virtual FloatRect strokeBBox() const;
bool hasRelativeValues() const;
private:
FloatPoint mapAbsolutePointToLocal(const FloatPoint&) const;
mutable Path m_path;
mutable FloatRect m_fillBBox;
mutable FloatRect m_strokeBbox;
FloatRect m_markerBounds;
AffineTransform m_matrix;
IntRect m_absoluteBounds;
};
}
#endif // ENABLE(SVG)
#endif