source: SH_SHM/trunk/source/newgraph/gmtusrdef.h @ 16

Revision 16, 6.1 KB checked in by marcus, 11 years ago (diff)

r1 | svn | 2007-12-13 11:10:29 +0100 (Do, 13 Dez 2007) | 2 lines

Initial import

Line 
1
2/* file gmtusrdef.h
3 *      ===========
4 *
5 * version 1, 7-Jul-2007
6 *
7 * interface of GMT channel to graphics module
8 * K. Stammler, 7-Jul-2007
9 */
10
11#ifndef __GMTUSRDEF
12#define __GMTUSRDEF
13
14
15typedef float GMTOUT;
16
17
18
19
20/*----------------------------------------------------------------------------*/
21
22
23void gmt_init( int attribs, GMTOUT xlo, GMTOUT ylo, GMTOUT width, GMTOUT height,
24   STATUS *status );
25
26/* initialises GMT channel
27 *
28 * parameters of routine
29 * int        attribs;        input; attributes
30 * GMTOUT     xlo, ylo;       input; offset of output
31 * GMTOUT     width, height;  input; size of output
32 * STATUS     *status;        output; return status
33 */
34
35
36/*----------------------------------------------------------------------------*/
37
38
39void gmt_exit( void );
40
41/* exits GMT channel
42 *
43 * no parameters
44 */
45
46
47/*----------------------------------------------------------------------------*/
48
49
50#define gmt_finish gmt_exit
51
52
53/*----------------------------------------------------------------------------*/
54
55
56void gmt_resize( GMTOUT xlo, GMTOUT ylo, GMTOUT width, GMTOUT height,
57   STATUS *status );
58
59/* resizes output of PostScript
60 *
61 * parameters of routine
62 * GMTOUT     xlo, ylo;       input; offset of output
63 * GMTOUT     width, height;  input; size of output
64 * STATUS     *status;        output; return status
65 */
66
67
68/*----------------------------------------------------------------------------*/
69
70
71void gmt_erase( void );
72
73/* clears GMT output channel
74 *
75 * no parameters
76 */
77
78
79/*----------------------------------------------------------------------------*/
80
81
82void gmt_prepare( STATUS *status );
83
84/* prepares hardcopy
85 *
86 * parameters of routine
87 * STATUS     *status;    output; return status
88 */
89
90
91/*----------------------------------------------------------------------------*/
92
93
94void gmt_cleanup( char outf[], STATUS *status );
95
96/* finishes hardcopy
97 *
98 * parameters of routine
99 * char       outf[];     output; output filename
100 * STATUS     *status;    output; return status
101 */
102
103
104/*----------------------------------------------------------------------------*/
105
106
107void gmt_setcoo( GBC_COO x, GBC_COO y, GBC_COO w, GBC_COO h, STATUS *status );
108
109/* sets user coordinates
110 *
111 * parameters of routine
112 * GBC_COO    x, y;     input; offset
113 * GBC_COO    w, h;     input; size
114 * STATUS     *status;  output; return status
115 */
116
117
118/*----------------------------------------------------------------------------*/
119
120
121void gmt_moveto( GBC_COO x, GBC_COO y );
122
123/* moves to position (x,y) in user coordinates
124 *
125 * parameters of routine
126 * GBC_COO    x, y;    input; position
127 */
128
129
130/*----------------------------------------------------------------------------*/
131
132
133void gmt_drawto( int style, GBC_COO x, GBC_COO y );
134
135/* draws to position (x,y) in user coordinates
136 *
137 * parameters of routine
138 * int        style;   input; style parameter
139 * GBC_COO    x, y;    input; position
140 */
141
142
143/*----------------------------------------------------------------------------*/
144
145
146void gmt_arrayplot( int style, long cnt, int red, GBC_COO xoff,
147   GBC_COO xinc, GBC_COO yoff, GBC_COO yarr[], float yzoom, STATUS *status );
148
149/* plots array of data points
150 *
151 * parameters of routine
152 * int        style;       input; style parameter
153 * long       cnt;         input; number of data samples in yarr
154 * int        red;         input; reduction factor
155 * GBC_COO    xoff;        input; x offset
156 * GBC_COO    xinc;        input; x increment
157 * GBC_COO    yoff;        input; y offset
158 * GBC_COO    yarr[];      input; data array
159 * float      yzoom;       input; amplitude zoom factor
160 * STATUS     *status;     output; return status
161 */
162
163
164/*----------------------------------------------------------------------------*/
165
166
167void gmt_text( int style, GBC_COO x, GBC_COO y, char text[] );
168
169/* prints text at position (x,y)
170 *
171 * parameters of routine
172 * int        style;     input; style parameter (size)
173 * GBC_COO    x, y;      input; text position (user coordinates)
174 * char       text[];    input; text to be printed
175 */
176
177
178/*----------------------------------------------------------------------------*/
179
180
181void gmt_setstyle( int style, char item[], char value[], STATUS *status );
182
183/* sets style parameter number "style"
184 *
185 * parameters of routine
186 * int        style;     input; number of style
187 * char       item[];    input; name of style attribute
188 * char       value[];   input; new value of style attribute (as string expr.)
189 * STATUS     *status;   output; return status
190 */
191
192
193/*----------------------------------------------------------------------------*/
194
195
196void gmt_set_outputdir( char dir[], STATUS *status );
197
198/* sets scratch directory
199 *
200 * parameters of routine
201 * char      dir[];     input; new directory name of scratch path
202 * STATUS    *status;   output; return status
203 */
204
205
206/*----------------------------------------------------------------------------*/
207
208
209void gmt_set_inputdir( char dir[], STATUS *status );
210
211/* sets input directory
212 *
213 * parameters of routine
214 * char      dir[];     input; new directory name
215 * STATUS    *status;   output; return status
216 */
217
218
219/*----------------------------------------------------------------------------*/
220
221
222#define gmt_charsize(s,x,t)
223
224/*----------------------------------------------------------------------------*/
225
226
227#define gmt_linestyle(s,l,t)
228
229#define gmt_linewidth(s,l,t)
230
231/*----------------------------------------------------------------------------*/
232
233
234#define gmt_color(s,r,g,b,t)
235
236/*----------------------------------------------------------------------------*/
237
238
239void gmt_setpar( char item[], char value[], STATUS *status );
240
241/* sets hardcopy parameters
242 *
243 * parameters of routine
244 * char       item[];     input; item to be set
245 * char       value[];    input; new value of item
246 * STATUS     *status;    output; return status
247 */
248
249
250/*----------------------------------------------------------------------------*/
251
252
253#define gmt_aspectratio() 1.0
254
255/*----------------------------------------------------------------------------*/
256
257
258void gmt_arrayswap( BOOLEAN on_off );
259
260/* switches array-swap on or off
261 *
262 * parameter of routine
263 * BOOLEAN   on_off;     TRUE=on, FALSE=off
264 */
265
266
267/*----------------------------------------------------------------------------*/
268
269
270
271#endif /* __GMTUSRDEF */
272
Note: See TracBrowser for help on using the repository browser.