#ifndef SVGFitToViewBox_h
#define SVGFitToViewBox_h
#if ENABLE(SVG)
#include "QualifiedName.h"
#include <wtf/HashSet.h>
namespace WebCore {
class AffineTransform;
class Attribute;
class Document;
class FloatRect;
class SVGPreserveAspectRatio;
class SVGFitToViewBox {
public:
virtual ~SVGFitToViewBox() { }
bool parseViewBox(Document*, const UChar*& start, const UChar* end, FloatRect& viewBox, bool validate = true);
static AffineTransform viewBoxToViewTransform(const FloatRect& viewBoxRect, const SVGPreserveAspectRatio&, float viewWidth, float viewHeight);
bool parseAttribute(Document*, Attribute*);
bool isKnownAttribute(const QualifiedName&);
void addSupportedAttributes(HashSet<QualifiedName>&);
virtual void setViewBoxBaseValue(const FloatRect&) = 0;
virtual void setPreserveAspectRatioBaseValue(const SVGPreserveAspectRatio&) = 0;
private:
bool parseViewBox(Document*, const String&, FloatRect&);
};
}
#endif // ENABLE(SVG)
#endif // SVGFitToViewBox_h