1 #ifndef PYDIA_GEOMETRY_H
2 #define PYDIA_GEOMETRY_H
3 
4 #include <Python.h>
5 #include "geometry.h"
6 #include "arrows.h"
7 
8 typedef struct {
9     PyObject_HEAD
10     union {
11       IntRectangle ri;
12       Rectangle rf;
13     } r;
14     gboolean is_int;
15 } PyDiaRectangle;
16 
17 extern PyTypeObject PyDiaRectangle_Type;
18 
19 PyObject* PyDiaRectangle_New (Rectangle* r, IntRectangle* ri);
20 PyObject* PyDiaRectangle_New_FromPoints (Point* ul, Point* lr);
21 
22 typedef struct {
23     PyObject_HEAD
24     Point pt;
25 } PyDiaPoint;
26 
27 extern PyTypeObject PyDiaPoint_Type;
28 
29 PyObject* PyDiaPoint_New (Point* pt);
30 PyObject* PyDiaPointTuple_New (Point* pts, int num);
31 
32 typedef struct {
33     PyObject_HEAD
34     BezPoint bpn;
35 } PyDiaBezPoint;
36 
37 extern PyTypeObject PyDiaBezPoint_Type;
38 
39 PyObject* PyDiaBezPoint_New (BezPoint* bpn);
40 PyObject* PyDiaBezPointTuple_New (BezPoint* pts, int num);
41 
42 typedef struct {
43     PyObject_HEAD
44     Arrow arrow;
45 } PyDiaArrow;
46 
47 extern PyTypeObject PyDiaArrow_Type;
48 
49 PyObject* PyDiaArrow_New (Arrow* arrow);
50 
51 #endif
52