File: pydia-geometry.h

package info (click to toggle)
dia 0.97.3%2Bgit20160930-9
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 54,372 kB
  • sloc: ansic: 155,065; xml: 16,326; python: 6,641; cpp: 4,935; makefile: 3,833; sh: 540; perl: 137; sed: 19
file content (60 lines) | stat: -rw-r--r-- 1,147 bytes parent folder | download | duplicates (3)
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
54
55
56
57
58
59
60
#ifndef PYDIA_GEOMETRY_H
#define PYDIA_GEOMETRY_H

#include <Python.h>
#include "geometry.h"
#include "arrows.h"

typedef struct {
    PyObject_HEAD
    union {
      IntRectangle ri;
      Rectangle rf;
    } r;
    gboolean is_int;
} PyDiaRectangle;

extern PyTypeObject PyDiaRectangle_Type;

PyObject* PyDiaRectangle_New (Rectangle* r, IntRectangle* ri);
PyObject* PyDiaRectangle_New_FromPoints (Point* ul, Point* lr);

typedef struct {
    PyObject_HEAD
    Point pt;
} PyDiaPoint;

extern PyTypeObject PyDiaPoint_Type;

PyObject* PyDiaPoint_New (Point* pt);
PyObject* PyDiaPointTuple_New (Point* pts, int num);

typedef struct {
    PyObject_HEAD
    BezPoint bpn;
} PyDiaBezPoint;

extern PyTypeObject PyDiaBezPoint_Type;

PyObject* PyDiaBezPoint_New (BezPoint* bpn);
PyObject* PyDiaBezPointTuple_New (BezPoint* pts, int num);

typedef struct {
    PyObject_HEAD
    Arrow arrow;
} PyDiaArrow;

extern PyTypeObject PyDiaArrow_Type;

PyObject* PyDiaArrow_New (Arrow* arrow);

typedef struct {
    PyObject_HEAD
    DiaMatrix matrix;
} PyDiaMatrix;

extern PyTypeObject PyDiaMatrix_Type;

PyObject* PyDiaMatrix_New (DiaMatrix* arrow);

#endif