#ifndef KSVG_SVGMatrixImpl_H
#define KSVG_SVGMatrixImpl_H
#if SVG_SUPPORT
#include "AffineTransform.h"
#include "Shared.h"
namespace WebCore
{
typedef int ExceptionCode;
class SVGMatrix : public Shared<SVGMatrix>
{
public:
SVGMatrix();
SVGMatrix(double a, double b, double c, double d, double e, double f);
SVGMatrix(const AffineTransform& mat);
virtual ~SVGMatrix();
void setA(double);
double a() const;
void setB(double);
double b() const;
void setC(double);
double c() const;
void setD(double);
double d() const;
void setE(double);
double e() const;
void setF(double);
double f() const;
void copy(const SVGMatrix*);
SVGMatrix* inverse(ExceptionCode&);
SVGMatrix* multiply(const SVGMatrix*);
SVGMatrix* translate(double x, double y);
SVGMatrix* scale(double scaleFactor);
SVGMatrix* scaleNonUniform(double scaleFactorX, double scaleFactorY);
SVGMatrix* rotate(double angle);
SVGMatrix* rotateFromVector(double x, double y, ExceptionCode&);
SVGMatrix* flipX();
SVGMatrix* flipY();
SVGMatrix* skewX(double angle);
SVGMatrix* skewY(double angle);
SVGMatrix* postMultiply(const SVGMatrix*);
SVGMatrix* postTranslate(double x, double y);
SVGMatrix* postScale(double scaleFactor);
SVGMatrix* postScaleNonUniform(double scaleFactorX, double scaleFactorY);
SVGMatrix* postRotate(double angle);
SVGMatrix* postRotateFromVector(double x, double y);
SVGMatrix* postFlipX();
SVGMatrix* postFlipY();
SVGMatrix* postSkewX(double angle);
SVGMatrix* postSkewY(double angle);
void reset();
AffineTransform& matrix();
const AffineTransform& matrix() const;
void removeScale(double* xScale, double* yScale);
private:
void setMatrix(const AffineTransform&);
AffineTransform m_mat;
};
};
#endif // SVG_SUPPORT
#endif