KHTML
SVGFitToViewBox.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SVGFitToViewBox_h
00024 #define SVGFitToViewBox_h
00025
00026 #if ENABLE(SVG)
00027 #include "SVGElement.h"
00028
00029 namespace WebCore {
00030
00031 class AffineTransform;
00032 class SVGPreserveAspectRatio;
00033
00034 class SVGFitToViewBox {
00035 public:
00036 SVGFitToViewBox();
00037 virtual ~SVGFitToViewBox();
00038
00039
00040 bool parseViewBox(const UChar*& start, const UChar* end, float& x, float& y, float& w, float& h, bool validate = true);
00041 virtual AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const;
00042
00043 bool parseMappedAttribute(MappedAttribute*);
00044 bool isKnownAttribute(const QualifiedName&);
00045
00046 protected:
00047 virtual const SVGElement* contextElement() const = 0;
00048
00049 private:
00050 ANIMATED_PROPERTY_DECLARATIONS_WITH_CONTEXT(SVGFitToViewBox, FloatRect, FloatRect, ViewBox, viewBox)
00051 ANIMATED_PROPERTY_DECLARATIONS_WITH_CONTEXT(SVGFitToViewBox, SVGPreserveAspectRatio*, RefPtr<SVGPreserveAspectRatio>, PreserveAspectRatio, preserveAspectRatio)
00052 };
00053
00054 }
00055
00056 #endif // ENABLE(SVG)
00057 #endif // SVGFitToViewBox_h