summaryrefslogtreecommitdiff
path: root/inc/cgmtypes.h
blob: fd96bb7183cb2a7ab8a0f7f7e256ffadaa18d031 (plain)
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
61
62
63
64
65
66
67
#ifndef CGMTYPES_H
#define CGMTYPES_H

     /*  Include the only file on which this is dependent.  */

#include "cgmmach.h"

/*  CGM Typedefs  */

typedef short Logical;
typedef long Index;
typedef unsigned short Enum;
typedef Int16 Code;
typedef long Prec;
typedef unsigned long Posint;
typedef float Ptype;
typedef double Mtype;

/*  Structures used by CGM user interface */

typedef struct { float x, y; } Point;
typedef struct { float x, y; } Vector;
typedef struct { Posint red, green, blue; } RGBcolour;
struct colour {
   Index index;
   Posint red, green, blue;
};
typedef struct colour Colour;

typedef Index Indexcolour;

/*  Useful Structures for CGM routines */

struct vdc {
   long intr;
   float real;
};
typedef struct vdc Vdc;

struct colourentry {
   float red, green, blue;
};
typedef struct colourentry Colourentry;

typedef double Tmatrix[3][2];

struct point {
 struct vdc x, y;
};
typedef struct point Cpoint;

struct rect {
  struct point a, b;
};

typedef struct { float left, right, top, bot; } Rect;


#ifndef TRUE
#define TRUE    ((Logical) 1)
#endif

#ifndef FALSE
#define FALSE   ((Logical) 0)
#endif

#endif  /*  end of cgmtypes.h  */