SVGAnimateMotionElement.h [plain text]
#pragma once
#include "Path.h"
#include "SVGAnimationElement.h"
namespace WebCore {
class AffineTransform;
class SVGAnimateMotionElement final : public SVGAnimationElement {
public:
static Ref<SVGAnimateMotionElement> create(const QualifiedName&, Document&);
void updateAnimationPath();
private:
SVGAnimateMotionElement(const QualifiedName&, Document&);
bool hasValidAttributeType() override;
bool hasValidAttributeName() override;
void parseAttribute(const QualifiedName&, const AtomicString&) override;
void resetAnimatedType() override;
void clearAnimatedType(SVGElement* targetElement) override;
bool calculateToAtEndOfDurationValue(const String& toAtEndOfDurationString) override;
bool calculateFromAndToValues(const String& fromString, const String& toString) override;
bool calculateFromAndByValues(const String& fromString, const String& byString) override;
void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILElement* resultElement) override;
void applyResultsToTarget() override;
float calculateDistance(const String& fromString, const String& toString) override;
enum RotateMode {
RotateAngle,
RotateAuto,
RotateAutoReverse
};
RotateMode rotateMode() const;
void buildTransformForProgress(AffineTransform*, float percentage);
bool m_hasToPointAtEndOfDuration;
void updateAnimationMode() override;
FloatPoint m_fromPoint;
FloatPoint m_toPoint;
FloatPoint m_toPointAtEndOfDuration;
Path m_path;
Path m_animationPath;
};
}