#ifndef RenderSVGImage_h
#define RenderSVGImage_h
#if ENABLE(SVG)
#include "TransformationMatrix.h"
#include "FloatRect.h"
#include "RenderImage.h"
namespace WebCore {
class SVGImageElement;
class SVGPreserveAspectRatio;
class RenderSVGImage : public RenderImage {
public:
RenderSVGImage(SVGImageElement*);
virtual ~RenderSVGImage();
virtual TransformationMatrix localTransform() const { return m_localTransform; }
virtual FloatRect relativeBBox(bool includeStroke = true) const;
virtual IntRect clippedOverflowRectForRepaint(RenderBox* repaintContainer);
virtual void absoluteRects(Vector<IntRect>&, int tx, int ty, bool topLevel = true);
virtual void absoluteQuads(Vector<FloatQuad>&, bool topLevel = true);
virtual void addFocusRingRects(GraphicsContext*, int tx, int ty);
virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
void adjustRectsForAspectRatio(FloatRect& destRect, FloatRect& srcRect, SVGPreserveAspectRatio*);
virtual void layout();
virtual void paint(PaintInfo&, int parentX, int parentY);
bool requiresLayer() const { return false; }
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int _x, int _y, int _tx, int _ty, HitTestAction);
bool calculateLocalTransform();
private:
void calculateAbsoluteBounds();
TransformationMatrix m_localTransform;
FloatRect m_localBounds;
IntRect m_absoluteBounds;
};
}
#endif // ENABLE(SVG)
#endif // RenderSVGImage_h