~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to incl/aglstruc.h

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* @(#)aglstruc.h       19.1  (OAA-ASTRONET) 02/25/03 13:49:25   */
 
2
/*
 
3
 * HEADER : aglstruc.h     - Vers 3.6.001  - Jul 1993 -  L. Fini, OAA
 
4
 *                         - Vers 3.6.000  - Nov 1991 -  L. Fini, OAA
 
5
 */
 
6
 
 
7
 
 
8
 
 
9
 
 
10
/*********************************           *********************************/
 
11
/*                              DATA STRUCTURES                              */
 
12
 
 
13
 
 
14
enum GRAPH_MODES { NORMAL=0, USER=1, SPECIAL=2 };
 
15
 
 
16
struct polyline {               /* POLYLINE STRUCTURE                        */
 
17
        int maxvects;           /* Maximum number of elements allowed into   */
 
18
                                /* polyline body vectors                     */
 
19
        int nvects;             /* Number of elements into polyline          */
 
20
        int marker;             /* Either -1  for polyline, or marker code   */
 
21
                                /* for polymarker                            */
 
22
        float *XV, *YV;         /* polyline body                             */
 
23
        enum GRAPH_MODES grmode;/* Graphic mode attached to polyline.        */
 
24
                                /* Either USER, NORMAL or SPECIAL.           */
 
25
        enum GRAPH_MODES clipmode;      /* Clipping mode attached to polyline*/
 
26
                                        /* Either USER or NORMAL.            */
 
27
        int join;               /* flag to specify joining of a series of    */
 
28
                                /* polylines                                 */
 
29
        void (*flush)();        /* Flushing routine address                  */
 
30
};
 
31
 
 
32
 
 
33
struct AGL_cmod {               /* Character modification structure          */
 
34
                                /* ------------------------------------------*/
 
35
                                /* The following parameters are set up by    */
 
36
                                /* metacharacter interpretation              */
 
37
        int the_char;           /* Code of character  to draw                */
 
38
        int font;               /* Font                                      */
 
39
        int backspace;          /* number of backspaces prior of drawing     */
 
40
        int newline;            /* Number of newlines prior of drawing       */
 
41
        int lwdt;               /* Line width to be used in drawing          */
 
42
        int color;              /* Color to be used in drawing               */
 
43
        double mfact;           /* Multiplying factor                        */
 
44
        double vshift;          /* Vertical shift                            */
 
45
        double slant;           /* Slant factor                              */
 
46
};
 
47
 
 
48
struct AGL_cdes {               /* Character description structure           */
 
49
                                /* ------------------------------------------*/
 
50
        double blk_gap;         /* Blank gap to next character (pixels)      */
 
51
        double heigth;          /* Character heigth (pixels) maximum as in   */
 
52
                                /* characters l,d                            */
 
53
        double width;           /* Character width   (pixels)                */
 
54
        double down_ext;        /* Downward extension (pixels) as in p,q     */
 
55
        double scale;           /* Scaling factor initialized from font scale*/
 
56
        int ncodes;             /* number of codes in char description       */
 
57
        unsigned char *codes;   /* pointer to char description               */
 
58
        int nstrokes;           /* Number of strokes to draw the character   */
 
59
        struct polyline strokes[MAX_STROKES];   /* Stroke polilines          */
 
60
        float XB[CHARPOLYBUFLNG];               /* Coordinate buffers        */
 
61
        float YB[CHARPOLYBUFLNG];               /* Coordinate buffers        */
 
62
};
 
63
 
 
64
struct AGL_char {
 
65
        struct AGL_cmod modifier;
 
66
        struct AGL_cdes descriptor;
 
67
};
 
68
 
 
69
/* The following structure holds character definition for AGL character      */
 
70
/* fonts. Character fonts for basic ASCII characters and for marker symbols  */
 
71
/* are coded within AGL, More fonts may be provided (and actually are) as    */
 
72
/* files to be read at run time, if required.                                */
 
73
 
 
74
struct AGL_font {
 
75
        char fontnam [12];      /* Font name                                 */
 
76
        int fcode;              /* First code accepted (lower codes return   */
 
77
                                /* the same character as the first one)      */
 
78
        unsigned nchars;        /* Number of characters                      */
 
79
        unsigned nbytes;        /* Number of bytes in character buffer       */
 
80
        float  c_gap;           /* Blank gap between characters (standard=1) */
 
81
        float  maxup;           /* Maximum character dimension upward (as in */
 
82
                                /* characters d,l)                           */
 
83
        float  maxdown;         /* Maximum character dimension downward (as  */
 
84
                                /* in characters p,q)                        */
 
85
        float  fscale;          /* Scaling factor to get same dimension as   */
 
86
                                /* standard font                             */
 
87
                                /* For the standard font this value is 1.0   */
 
88
        short *index;           /* Pointer to indexes array                  */
 
89
        unsigned char *chrwdt;  /* Character widths pointer                  */
 
90
        unsigned char *dsclen;  /* Character description lengths pointer     */
 
91
        unsigned char *cbuffr;  /* Character description buffer pointer      */
 
92
};
 
93
 
 
94
struct limits {
 
95
        double xlower,xupper;
 
96
        double ylower,yupper;
 
97
 };
 
98
 
 
99
 
 
100
/**********************  AGL DYNAMIC STATUS STRUCTURE  **********************/
 
101
 
 
102
/* AGL dynamic status is the set of variables associated with each viewport */
 
103
 
 
104
struct VWPDYN {                         /**************************************/
 
105
                                        /* DRIVER INTERFACE SUPPORT           */
 
106
        int devidx;                     /* Device internal index              */
 
107
        int curchan;                    /* Device graphic channel             */
 
108
 
 
109
                                        /**************************************/
 
110
                                        /* GRAPHIC STATUS VARIABLES           */
 
111
        int color;                      /* Current pen/color                  */
 
112
        int lstyle;                     /* Current line style                 */
 
113
        int lwidth;                     /* Current line width                 */
 
114
        int wrmode;                     /* Current write mode (S,X,O,E)       */
 
115
        int curstyl;                    /* Current cursor style               */
 
116
        enum GRAPH_MODES modeflag;      /* Current graphic mode               */
 
117
        int autoasp;                    /* Auto aspect ratio control flag     */
 
118
        struct limits vwprt;            /* Current viewport bounds            */
 
119
        struct limits clpng;            /* Current clipping area bounds       */
 
120
        struct limits saved;            /* Clipping area limits save buffer   */
 
121
        
 
122
        int window;                     /* Window defined flag                */
 
123
        int flogx,flogy;                /* Logarithm. transform flags         */
 
124
        struct limits usrwn;            /* User window limits                 */
 
125
 
 
126
        void (*UsrInit)();              /* User initialization routine        */
 
127
        int  (*UsrTransf)();            /* User transformation routine        */
 
128
        int  (*UsrRTransf)();           /* User inverse transformation routine*/
 
129
 
 
130
                                        /**************************************/
 
131
                                        /* TEXT RELATED VARIABLES             */
 
132
        int textlw;                     /* Current line width for text        */
 
133
        double angfct;                  /* Angular conversion factor          */
 
134
        double changle;                 /* Current string orientation         */
 
135
        double chrhsize,chrvsize;       /* Current character sizes            */
 
136
        double symbsize;                /* Current symbol size                */
 
137
        double scale;                   /* Global scaling factor for symbols  */
 
138
                                        /* and characters                     */
 
139
        int curfont;                    /* Current font selector              */
 
140
        
 
141
                                        /**************************************/
 
142
                                        /* METAFILE RELATED VARIABLES         */
 
143
        int filact;                     /* Metafile active flag               */
 
144
        int metamode;                   /* Temporary storage for flag         */
 
145
        FILE *metafile;                 /* Metafile file pointer              */
 
146
 
 
147
                                        /**************************************/
 
148
                                        /* USER DEFINABLE AREA                */
 
149
        int n_int_user;                 /* Number of integer values defined   */
 
150
        int int_user[MAX_INT_US];       /* Integer user parameters area       */
 
151
        int n_float_user;               /* Number of float values defined     */
 
152
        float float_user[MAX_FLOAT_US]; /* Float user parameters area         */
 
153
};
 
154
 
 
155
 
 
156
/************************  DEVICE STATUS STRUCTURE  *************************/
 
157
 
 
158
struct DEVPAR {
 
159
        double xpixels,ypixels;         /* Dimensions in pixels               */
 
160
        double xleng,yleng;             /* Default axes length (cm.)          */
 
161
        double xmaxl,ymaxl;             /* Max axes lengths (zero if unsupp.) */
 
162
        double xcurl,ycurl;             /* Current axes lengths               */
 
163
        double rslx,rsly;               /* resolution (1/xpixel,1/ypixel)     */
 
164
        double ratyx;                   /* Device aspect ratio Y/X            */
 
165
        double ratxy;                   /* Device aspect ratio X/Y            */
 
166
        double dotlen;                  /* Dot lenght (for dot/dashes)        */
 
167
        double charmult;                /* Character dimension multiplier     */
 
168
        unsigned flags;                 /* Characteristics flags              */
 
169
        int (*(*drvaddr))();            /* Device driver table pointer        */
 
170
        int nplans;                     /* Number of colors (pens)            */
 
171
        int  grchan;                    /* Graphic I/O channel                */
 
172
        int  actreqst;                  /* Active viewport requests           */
 
173
        int maxlwid;                    /* Max line width identifier          */
 
174
        int colors[AGLCOLORS];          /* Standard colors                    */
 
175
        char curbackgr;                 /* Current background color           */
 
176
        char defbackgr;                 /* Default background color           */
 
177
        char defforegr;                 /* Default foreground color           */
 
178
        char devnam[PHNAMLNG];          /* Device name                        */
 
179
        char filnam[PHNAMLNG];          /* Associated file name               */
 
180
        char devcmd[DEVCMDLNG];         /* Command to execute at device close */
 
181
};
 
182
 
 
183
struct AGL_STATUS {                     /* This structure contains the full   */
 
184
                                        /* AGL status                         */
 
185
 
 
186
        struct DEVPAR actidx[MAXACTIVE];/* DEVICE CHARACTERISTICS        */
 
187
 
 
188
 
 
189
                                        /**************************************/
 
190
                                        /* STATIC STATUS VARIABLES            */
 
191
 
 
192
 
 
193
        struct VWPDYN *vwpts[MAXVWPTS];
 
194
        int curvwp;                     /* Current viewport id                */
 
195
        int devid;                      /* Current device index (=DY(devidx)) */
 
196
        struct VWPDYN *vwpoint;         /* Current viewport pointer           */
 
197
 
 
198
        int  (*CURS_POINTER)();         /* Current driver entry points        */
 
199
        int  (*ERAS_POINTER)(); 
 
200
        int  (*ESCP_POINTER)();
 
201
        int  (*INIT_POINTER)();
 
202
        int  (*SEND_POINTER)();
 
203
        int  (*TERM_POINTER)();
 
204
        int  (*POLY_POINTER)();
 
205
 
 
206
                                        /**************************************/
 
207
                                        /* GRAPHIC STATUS VARIABLES           */
 
208
        double aglfcx,aglfcy,           /* Auxiliary params for coord.convers.*/
 
209
               aglofx,aglofy;    
 
210
 
 
211
        int DefBkgr;                    /* Try to set this as default backgr. */
 
212
                                        /* color at device init.              */
 
213
        int ersonst;                    /* Erase on start flag                */
 
214
        int xlogon,ylogon;              /* Current transformation flags       */
 
215
 
 
216
        int UTransf;                    /* User transformation active flag    */
 
217
        int (*CUsrTransf)();            /* Current user transformation entry  */
 
218
 
 
219
                                        /**************************************/
 
220
                                        /* DASH SUPPORT                       */
 
221
        int dashon;                     /* TRUE if dashing is on              */
 
222
                                        /**************************************/
 
223
 
 
224
                                        /**************************************/
 
225
                                        /* ERROR MANAGEMENT VARIABLES         */
 
226
 
 
227
        int  errstat;                   /* Most recent error status           */
 
228
        int  lasterr;                   /* Last error code                    */
 
229
        char *lastname;                 /* last module name                   */
 
230
        int  sevmsg;                    /* Severity treshold for  messages    */
 
231
        int  sevterm;                   /* Severity treshold for termination  */
 
232
 
 
233
                                        /*--------------------------------*/
 
234
                                        /* Device drivers support         */
 
235
 
 
236
        int ndevs;                      /* Number of device drivers       */
 
237
        char 
 
238
        drvname[NDRIVERS][DRVNAMLNG];   /* device driver names table      */
 
239
        int 
 
240
        (*drvtab[NDRIVERS][NFUNCTS])(); /* driver entry points table      */
 
241
 
 
242
        struct bufcom cmbuffr;
 
243
};