SVGAnimateMotionElement.h [plain text]
#ifndef SVGAnimateMotionElement_h
#define SVGAnimateMotionElement_h
#if ENABLE(SVG) && ENABLE(SVG_EXPERIMENTAL_FEATURES)
#include "SVGAnimationElement.h"
#include "AffineTransform.h"
#include "Path.h"
namespace WebCore {
class SVGAnimateMotionElement : public SVGAnimationElement {
public:
SVGAnimateMotionElement(const QualifiedName&, Document*);
virtual ~SVGAnimateMotionElement();
virtual bool hasValidTarget() const;
virtual bool updateAnimationBaseValueFromElement();
virtual void applyAnimatedValueToElement();
virtual void parseMappedAttribute(MappedAttribute*);
Path animationPath();
protected:
virtual const SVGElement* contextElement() const { return this; }
virtual bool updateAnimatedValue(EAnimationMode, float timePercentage, unsigned valueIndex, float percentagePast);
virtual bool calculateFromAndToValues(EAnimationMode, unsigned valueIndex);
private:
FloatPoint m_basePoint;
FloatSize m_animatedTranslation;
float m_animatedAngle;
FloatPoint m_fromPoint;
float m_fromAngle;
FloatPoint m_toPoint;
float m_toAngle;
FloatSize m_pointDiff;
float m_angleDiff;
Path m_path;
Vector<float> m_keyPoints;
enum RotateMode {
AngleMode,
AutoMode,
AutoReverseMode
};
RotateMode m_rotateMode;
float m_angle;
};
}
#endif // ENABLE(SVG)
#endif // SVGAnimateMotionElement_h