#ifndef SVGMatrixTearOff_h
#define SVGMatrixTearOff_h
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/ScriptWrappable.h"
#include "platform/transforms/AffineTransform.h"
#include "wtf/RefCounted.h"
namespace WebCore {
class SVGTransformTearOff;
class SVGMatrixTearOff FINAL : public RefCounted<SVGMatrixTearOff>, public ScriptWrappable {
public:
static PassRefPtr<SVGMatrixTearOff> create(const AffineTransform& value)
{
return adoptRef(new SVGMatrixTearOff(value));
}
static PassRefPtr<SVGMatrixTearOff> create(SVGTransformTearOff* target)
{
return adoptRef(new SVGMatrixTearOff(target));
}
~SVGMatrixTearOff();
double a() { return value().a(); }
double b() { return value().b(); }
double c() { return value().c(); }
double d() { return value().d(); }
double e() { return value().e(); }
double f() { return value().f(); }
void setA(double, ExceptionState&);
void setB(double, ExceptionState&);
void setC(double, ExceptionState&);
void setD(double, ExceptionState&);
void setE(double, ExceptionState&);
void setF(double, ExceptionState&);
PassRefPtr<SVGMatrixTearOff> translate(double tx, double ty);
PassRefPtr<SVGMatrixTearOff> scale(double);
PassRefPtr<SVGMatrixTearOff> scaleNonUniform(double sx, double sy);
PassRefPtr<SVGMatrixTearOff> rotate(double);
PassRefPtr<SVGMatrixTearOff> flipX();
PassRefPtr<SVGMatrixTearOff> flipY();
PassRefPtr<SVGMatrixTearOff> skewX(double);
PassRefPtr<SVGMatrixTearOff> skewY(double);
PassRefPtr<SVGMatrixTearOff> multiply(PassRefPtr<SVGMatrixTearOff>);
PassRefPtr<SVGMatrixTearOff> inverse(ExceptionState&);
PassRefPtr<SVGMatrixTearOff> rotateFromVector(double x, double y, ExceptionState&);
SVGTransformTearOff* contextTransform() { return m_contextTransform; }
const AffineTransform& value() const;
private:
SVGMatrixTearOff(const AffineTransform&);
SVGMatrixTearOff(SVGTransformTearOff*);
AffineTransform* mutableValue();
void commitChange();
AffineTransform m_staticValue;
SVGTransformTearOff* m_contextTransform;
};
}
#endif