#ifndef SVGTransformTearOff_h
#define SVGTransformTearOff_h
#include "bindings/v8/ScriptWrappable.h"
#include "core/svg/SVGMatrixTearOff.h"
#include "core/svg/SVGTransform.h"
#include "core/svg/properties/SVGPropertyTearOff.h"
namespace WebCore {
class SVGMatrix;
class SVGTransformTearOff FINAL : public SVGPropertyTearOff<SVGTransform>, public ScriptWrappable {
public:
enum SVGTransformType {
SVG_TRANSFORM_UNKNOWN = WebCore::SVG_TRANSFORM_UNKNOWN,
SVG_TRANSFORM_MATRIX = WebCore::SVG_TRANSFORM_MATRIX,
SVG_TRANSFORM_TRANSLATE = WebCore::SVG_TRANSFORM_TRANSLATE,
SVG_TRANSFORM_SCALE = WebCore::SVG_TRANSFORM_SCALE,
SVG_TRANSFORM_ROTATE = WebCore::SVG_TRANSFORM_ROTATE,
SVG_TRANSFORM_SKEWX = WebCore::SVG_TRANSFORM_SKEWX,
SVG_TRANSFORM_SKEWY = WebCore::SVG_TRANSFORM_SKEWY,
};
static PassRefPtr<SVGTransformTearOff> create(PassRefPtr<SVGTransform> target, SVGElement* contextElement, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName& attributeName = nullQName())
{
return adoptRef(new SVGTransformTearOff(target, contextElement, propertyIsAnimVal, attributeName));
}
virtual ~SVGTransformTearOff();
unsigned short transformType() { return target()->transformType(); }
SVGMatrixTearOff* matrix();
float angle() { return target()->angle(); }
void setMatrix(PassRefPtr<SVGMatrixTearOff>, ExceptionState&);
void setTranslate(float tx, float ty, ExceptionState&);
void setScale(float sx, float sy, ExceptionState&);
void setRotate(float angle, float cx, float cy, ExceptionState&);
void setSkewX(float, ExceptionState&);
void setSkewY(float, ExceptionState&);
private:
SVGTransformTearOff(PassRefPtr<SVGTransform>, SVGElement* contextElement, PropertyIsAnimValType, const QualifiedName& attributeName);
RefPtr<SVGMatrixTearOff> m_matrixTearoff;
};
}
#endif