-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathabstracttransform.h
More file actions
53 lines (41 loc) · 936 Bytes
/
abstracttransform.h
File metadata and controls
53 lines (41 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef ABSTRACTTRANSFORM_H
#define ABSTRACTTRANSFORM_H
#include <QtMath>
#include <QDebug>
#include <QPointF>
#include <QStringList>
class AbstractTransform
{
public:
virtual int type() = 0;
enum TransformTypes { TRANS_ROTATE, TRANS_MATRIX, TRANS_TRANSLATE };
};
class RotationTransform : public AbstractTransform
{
public:
int type() { return 0; }
RotationTransform(double a, QPointF c) { angle = a; center = c; }
double angle;
QPointF center;
};
class Matrix3x3 : public AbstractTransform
{
public:
int type() { return 1; }
Matrix3x3() {}
double m11;
double m12;
double m13;
double m21;
double m22;
double m23;
bool isSet;
};
class Translate : public AbstractTransform
{
public:
int type() { return 2; }
Translate(QPointF t) { translate = t; }
QPointF translate;
};
#endif // ABSTRACTTRANSFORM_H