KHTML
SVGAnimateElement.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
00024 #ifndef SVGAnimateElement_h
00025 #define SVGAnimateElement_h
00026
00027 #if ENABLE(SVG) && ENABLE(SVG_ANIMATION)
00028
00029 #include "SVGAnimationElement.h"
00030
00031 namespace WebCore {
00032
00033 class SVGAnimateElement : public SVGAnimationElement {
00034 public:
00035 SVGAnimateElement(const QualifiedName&, Document*);
00036 virtual ~SVGAnimateElement();
00037
00038 protected:
00039 virtual const SVGElement* contextElement() const { return this; }
00040
00041 virtual void resetToBaseValue(const String&);
00042 virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
00043 virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
00044 virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSMILElement* resultElement);
00045 virtual void applyResultsToTarget();
00046 virtual float calculateDistance(const String& fromString, const String& toString);
00047
00048 private:
00049 enum PropertyType { NumberProperty, ColorProperty, StringProperty };
00050 PropertyType determinePropertyType(const String& attribute) const;
00051 PropertyType m_propertyType;
00052
00053 double m_fromNumber;
00054 double m_toNumber;
00055 double m_animatedNumber;
00056 String m_numberUnit;
00057 Color m_fromColor;
00058 Color m_toColor;
00059 Color m_animatedColor;
00060 String m_fromString;
00061 String m_toString;
00062 String m_animatedString;
00063 };
00064
00065 }
00066
00067 #endif // ENABLE(SVG)
00068 #endif // SVGAnimateElement_h
00069
00070