23 #ifndef _LAX_TRANSFORMMATH_H
24 #define _LAX_TRANSFORMMATH_H
26 #include <lax/vectors.h>
41 Affine(
double xx,
double xy,
double yx,
double yy,
double tx,
double ty);
46 virtual void set(
Affine a);
47 virtual void setIdentity();
48 virtual bool isIdentity();
50 virtual void setScale(
double sx,
double sy);
52 virtual void setBasics(
double x,
double y,
double sx,
double sy,
double angle,
double shear);
53 virtual void getBasics(
double *x,
double *y,
double *sx,
double *sy,
double *angle,
double *shear);
56 virtual void Rotate(
double angle);
57 virtual void Rotate(
double angle,
flatpoint around_point);
62 virtual void Scale(
double s);
63 virtual void Scale(
flatpoint o,
double s);
64 virtual void Scale(
flatpoint o,
double sx,
double sy);
78 virtual const double *m()
const {
return _m; }
79 virtual void m(
const double *mm);
80 virtual void m(
double xx,
double xy,
double yx,
double yy,
double tx,
double ty);
81 virtual double m(
int c) {
return _m[c]; }
82 virtual void m(
int c,
double v) { _m[c]=v; }
87 virtual void origin(
flatpoint o) { _m[4]=o.x; _m[5]=o.y; }
89 virtual void xaxis(
flatpoint x) { _m[0]=x.x; _m[1]=x.y; }
91 virtual void yaxis(
flatpoint y) { _m[2]=y.x; _m[3]=y.y; }
95 int is_degenerate_transform(
double *m);
97 double *
transform_mult(
double *result,
const double *a,
const double *b);
104 double *
transform_set(
double *m,
double a,
double b,
double c,
double d,
double x0,
double y0);