KHTML
SVGAnimateMotionElement.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 SVGAnimateMotionElement_h
00024 #define SVGAnimateMotionElement_h
00025 #if ENABLE(SVG_ANIMATION)
00026
00027 #include "SVGAnimationElement.h"
00028 #include "AffineTransform.h"
00029 #include "Path.h"
00030
00031 namespace WebCore {
00032
00033 class SVGAnimateMotionElement : public SVGAnimationElement {
00034 public:
00035 SVGAnimateMotionElement(const QualifiedName&, Document*);
00036 virtual ~SVGAnimateMotionElement();
00037
00038 virtual bool hasValidTarget() const;
00039
00040 virtual void parseMappedAttribute(MappedAttribute*);
00041
00042 private:
00043 virtual const SVGElement* contextElement() const { return this; }
00044
00045 virtual void resetToBaseValue(const String&);
00046 virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
00047 virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
00048 virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSMILElement* resultElement);
00049 virtual void applyResultsToTarget();
00050 virtual float calculateDistance(const String& fromString, const String& toString);
00051 virtual Path animationPath() const;
00052
00053 enum RotateMode {
00054 RotateAngle,
00055 RotateAuto,
00056 RotateAutoReverse
00057 };
00058 RotateMode rotateMode() const;
00059
00060 FloatSize m_animatedTranslation;
00061 float m_animatedAngle;
00062
00063
00064 FloatPoint m_fromPoint;
00065 float m_fromAngle;
00066 FloatPoint m_toPoint;
00067 float m_toAngle;
00068
00069 unsigned m_baseIndexInTransformList;
00070
00071 Path m_path;
00072 Vector<float> m_keyPoints;
00073 float m_angle;
00074 };
00075
00076 }
00077
00078 #endif // ENABLE(SVG_ANIMATION)
00079 #endif // SVGAnimateMotionElement_h
00080
00081