1 | |
---|
2 | /* file GRAPHBAS.H |
---|
3 | * ========== |
---|
4 | * |
---|
5 | * version 5, 21-May-92 |
---|
6 | * |
---|
7 | * basic constants for graphic channels |
---|
8 | * K. Stammler, 9-AUG-91 |
---|
9 | */ |
---|
10 | |
---|
11 | #ifndef __GRAPHBAS |
---|
12 | #define __GRAPHBAS |
---|
13 | |
---|
14 | #define GBC_MAXWDW 7 |
---|
15 | #define GBC_CYCLEWDW -1 |
---|
16 | |
---|
17 | typedef int CHMAP; |
---|
18 | typedef float GBC_COO; |
---|
19 | |
---|
20 | #define GBC_REPLACE 1 /* writing mode: replace */ |
---|
21 | #define GBC_TRANSP 2 /* writing mode: transparent */ |
---|
22 | #define GBC_XOR 3 /* writing mode: XOR */ |
---|
23 | #define GBC_REVTRAN 4 /* writing mode: reverse transparent */ |
---|
24 | |
---|
25 | |
---|
26 | #define GBC_WPAINT 1 |
---|
27 | /* windowed paintbox type */ |
---|
28 | #define GBC_PPAINT 2 |
---|
29 | /* plain paintbox type */ |
---|
30 | |
---|
31 | /* |
---|
32 | * changes in the paintbox: update routines gc_playback AND gm_redraw |
---|
33 | */ |
---|
34 | |
---|
35 | typedef struct w_paintbox { |
---|
36 | int pbtype; |
---|
37 | void (*prepare)( int wdw, STATUS *status ); |
---|
38 | void (*moveto)( int wdw, GBC_COO x, GBC_COO y ); |
---|
39 | void (*drawto)( int wdw, int style, GBC_COO x, GBC_COO y ); |
---|
40 | void (*arrayplot)( int wdw, int style, long cnt, int red, |
---|
41 | GBC_COO xoff, GBC_COO xinc, GBC_COO yoff, GBC_COO yarr[], |
---|
42 | float yzoom, STATUS *status ); |
---|
43 | void (*text)( int wdw, int style, GBC_COO x, GBC_COO y, char text[] ); |
---|
44 | void (*setstyle)( int wdw, int style, char item[], |
---|
45 | char value[], STATUS *status ); |
---|
46 | void (*setcoo)( int wdw, GBC_COO x, GBC_COO y, GBC_COO w, |
---|
47 | GBC_COO h, STATUS *status ); |
---|
48 | void (*cleanup)( int wdw, char outf[], STATUS *status ); |
---|
49 | } W_PAINTBOX; |
---|
50 | |
---|
51 | typedef struct p_paintbox { |
---|
52 | int pbtype; |
---|
53 | void (*prepare)( STATUS *status ); |
---|
54 | void (*moveto)( GBC_COO x, GBC_COO y ); |
---|
55 | void (*drawto)( int style, GBC_COO x, GBC_COO y ); |
---|
56 | void (*arrayplot)( int style, long cnt, int red, |
---|
57 | GBC_COO xoff, GBC_COO xinc, GBC_COO yoff, GBC_COO yarr[], |
---|
58 | float yzoom, STATUS *status ); |
---|
59 | void (*text)( int style, GBC_COO x, GBC_COO y, char text[] ); |
---|
60 | void (*setstyle)( int style, char item[], char value[], STATUS *status ); |
---|
61 | void (*setcoo)( GBC_COO x, GBC_COO y, GBC_COO w, |
---|
62 | GBC_COO h, STATUS *status ); |
---|
63 | void (*cleanup)( char outf[], STATUS *status ); |
---|
64 | } P_PAINTBOX; |
---|
65 | |
---|
66 | typedef union paintbox { |
---|
67 | W_PAINTBOX wpb; |
---|
68 | P_PAINTBOX ppb; |
---|
69 | } PAINTBOX; |
---|
70 | |
---|
71 | |
---|
72 | /* redraw routine available for all graphic modules |
---|
73 | * defined in graphch.c |
---|
74 | */ |
---|
75 | #ifndef __THIS_IS_GRAPHCH |
---|
76 | extern void (*gbv_playback)( CHMAP src, CHMAP dst, PAINTBOX *pb, |
---|
77 | char outf[], STATUS *status ); |
---|
78 | #endif /* __THIS_IS_GRAPHCH */ |
---|
79 | |
---|
80 | |
---|
81 | #endif /* __GRAPHBAS */ |
---|
82 | |
---|