]> Shamusworld >> Repos - architektonas/blob - src/structs.h
Initial work on bringing sanity to insane codebase.
[architektonas] / src / structs.h
1 #ifndef __STRUCTS_H__
2 #define __STRUCTS_H__
3
4 #include <stdint.h>
5 #include <vector>
6 #include <string>
7 #include "vector.h"
8
9 #define OBJECT_COMMON \
10         int type;       \
11         uint32_t id;    \
12         int layer;      \
13         uint32_t color; \
14         float thickness;
15
16 struct Line {
17         OBJECT_COMMON;
18         Point p1;
19         Point p2;
20 };
21
22 struct Circle {
23         OBJECT_COMMON;
24         Point p1;
25         double radius;
26 };
27
28 struct Arc {
29         OBJECT_COMMON;
30         Point p1;
31         double radius;
32         double angle1;
33         double angle2;
34 };
35
36 struct Text {
37         OBJECT_COMMON;
38         Point p1;
39         std::string s;
40 };
41
42 struct Container {
43         OBJECT_COMMON;
44         Point p1;
45         std::vector<void *> objects;
46         double angle;
47         double scale;
48 };
49
50 struct Dimension {
51         OBJECT_COMMON;
52         int subtype;
53         Point p1;
54         Point p2;
55         double offset;
56 };
57
58 struct Object {
59         OBJECT_COMMON;
60 };
61
62
63 #endif  // __STRUCTS_H__
64