SVGAnimateMotionElement.h [plain text]
#ifndef SVGAnimateMotionElement_h
#define SVGAnimateMotionElement_h
#if ENABLE(SVG)
#include "AffineTransform.h"
#include "Path.h"
#include "SVGAnimationElement.h"
namespace WebCore {
class SVGAnimateMotionElement : public SVGAnimationElement {
public:
static PassRefPtr<SVGAnimateMotionElement> create(const QualifiedName&, Document*);
private:
SVGAnimateMotionElement(const QualifiedName&, Document*);
virtual bool hasValidAttributeType();
bool isSupportedAttribute(const QualifiedName&);
virtual void parseAttribute(Attribute*) OVERRIDE;
virtual void resetToBaseValue();
virtual bool calculateToAtEndOfDurationValue(const String& toAtEndOfDurationString);
virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
virtual void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILElement* resultElement);
virtual void applyResultsToTarget();
virtual float calculateDistance(const String& fromString, const String& toString);
virtual Path animationPath() const;
enum RotateMode {
RotateAngle,
RotateAuto,
RotateAutoReverse
};
RotateMode rotateMode() const;
void buildTransformForProgress(AffineTransform*, float percentage);
bool m_hasToPointAtEndOfDuration;
FloatPoint m_fromPoint;
FloatPoint m_toPoint;
FloatPoint m_toPointAtEndOfDuration;
Path m_path;
};
}
#endif // ENABLE(SVG)
#endif // SVGAnimateMotionElement_h