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

Revision 16, 7.9 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 PSUSRDEF.H
3 *      ==========
4 *
5 * version 4, 15-Sep-92
6 *
7 * interface of PostScript channel to graphics module
8 * K. Stammler, 12-AUG-91
9 */
10
11#ifndef __PSUSRDEF
12#define __PSUSRDEF
13
14
15typedef float PSOUT;
16
17
18#ifdef BC_G_POSTSCRIPT
19
20
21/*----------------------------------------------------------------------------*/
22
23
24void ps_init( int attribs, PSOUT xlo, PSOUT ylo, PSOUT width, PSOUT height,
25   STATUS *status );
26
27/* initialises PostScript channel
28 *
29 * parameters of routine
30 * int        attribs;        input; attributes
31 * PSOUT      xlo, ylo;       input; offset of output
32 * PSOUT      width, height;  input; size of output
33 * STATUS     *status;        output; return status
34 */
35
36
37/*----------------------------------------------------------------------------*/
38
39
40void ps_exit( void );
41
42/* exits PostScript channel
43 *
44 * no parameters
45 */
46
47
48/*----------------------------------------------------------------------------*/
49
50
51#define ps_finish ps_exit
52
53
54/*----------------------------------------------------------------------------*/
55
56
57void ps_resize( PSOUT xlo, PSOUT ylo, PSOUT width, PSOUT height,
58   STATUS *status );
59
60/* resizes output of PostScript
61 *
62 * parameters of routine
63 * PSOUT      xlo, ylo;       input; offset of output
64 * PSOUT      width, height;  input; size of output
65 * STATUS     *status;        output; return status
66 */
67
68
69/*----------------------------------------------------------------------------*/
70
71
72void ps_erase( void );
73
74/* clears PostScript output channel
75 *
76 * no parameters
77 */
78
79
80/*----------------------------------------------------------------------------*/
81
82
83void ps_prepare( STATUS *status );
84
85/* prepares hardcopy
86 *
87 * parameters of routine
88 * STATUS     *status;    output; return status
89 */
90
91
92/*----------------------------------------------------------------------------*/
93
94
95void ps_cleanup( char outf[], STATUS *status );
96
97/* finishes hardcopy
98 *
99 * parameters of routine
100 * char       outf[];     output; output filename
101 * STATUS     *status;    output; return status
102 */
103
104
105/*----------------------------------------------------------------------------*/
106
107
108void ps_setcoo( GBC_COO x, GBC_COO y, GBC_COO w, GBC_COO h, STATUS *status );
109
110/* sets user coordinates
111 *
112 * parameters of routine
113 * GBC_COO    x, y;     input; offset
114 * GBC_COO    w, h;     input; size
115 * STATUS     *status;  output; return status
116 */
117
118
119/*----------------------------------------------------------------------------*/
120
121
122void ps_moveto( GBC_COO x, GBC_COO y );
123
124/* moves to position (x,y) in user coordinates
125 *
126 * parameters of routine
127 * GBC_COO    x, y;    input; position
128 */
129
130
131/*----------------------------------------------------------------------------*/
132
133
134void ps_drawto( int style, GBC_COO x, GBC_COO y );
135
136/* draws to position (x,y) in user coordinates
137 *
138 * parameters of routine
139 * int        style;   input; style parameter
140 * GBC_COO    x, y;    input; position
141 */
142
143
144/*----------------------------------------------------------------------------*/
145
146
147void ps_arrayplot( int style, long cnt, int red, GBC_COO xoff,
148   GBC_COO xinc, GBC_COO yoff, GBC_COO yarr[], float yzoom, STATUS *status );
149
150/* plots array of data points
151 *
152 * parameters of routine
153 * int        style;       input; style parameter
154 * long       cnt;         input; number of data samples in yarr
155 * int        red;         input; reduction factor
156 * GBC_COO    xoff;        input; x offset
157 * GBC_COO    xinc;        input; x increment
158 * GBC_COO    yoff;        input; y offset
159 * GBC_COO    yarr[];      input; data array
160 * float      yzoom;       input; amplitude zoom factor
161 * STATUS     *status;     output; return status
162 */
163
164
165/*----------------------------------------------------------------------------*/
166
167
168void ps_text( int style, GBC_COO x, GBC_COO y, char text[] );
169
170/* prints text at position (x,y)
171 *
172 * parameters of routine
173 * int        style;     input; style parameter (size)
174 * GBC_COO    x, y;      input; text position (user coordinates)
175 * char       text[];    input; text to be printed
176 */
177
178
179/*----------------------------------------------------------------------------*/
180
181
182void ps_setstyle( int style, char item[], char value[], STATUS *status );
183
184/* sets style parameter number "style"
185 *
186 * parameters of routine
187 * int        style;     input; number of style
188 * char       item[];    input; name of style attribute
189 * char       value[];   input; new value of style attribute (as string expr.)
190 * STATUS     *status;   output; return status
191 */
192
193
194/*----------------------------------------------------------------------------*/
195
196
197void ps_set_outputdir( char dir[], STATUS *status );
198
199/* sets scratch directory
200 *
201 * parameters of routine
202 * char      dir[];     input; new directory name of scratch path
203 * STATUS    *status;   output; return status
204 */
205
206
207/*----------------------------------------------------------------------------*/
208
209
210void ps_set_inputdir( char dir[], STATUS *status );
211
212/* sets input directory
213 *
214 * parameters of routine
215 * char      dir[];     input; new directory name
216 * STATUS    *status;   output; return status
217 */
218
219
220/*----------------------------------------------------------------------------*/
221
222
223#define ps_charsize(s,x,t)
224#ifdef XXX
225void ps_charsize( int style, float size, STATUS *status );
226
227/* sets character size in units of display height
228 *
229 * parameters of routine
230 * int        style;     input; style number
231 * float      size;      input; size of character in units of display height
232 * STATUS     *status;   output; return status
233 */
234#endif
235
236/*----------------------------------------------------------------------------*/
237
238
239#define ps_linestyle(s,l,t)
240#ifdef XXX
241void ps_linestyle( int style, int linestyle, STATUS *status );
242
243/* sets line linestyle in style block number "style"
244 *
245 * parameters of routine
246 * int        style;      input; style block number
247 * int        linestyle;  input; number of line style
248 * STATUS     *status;    output; return status
249 */
250#endif
251
252#define ps_linewidth(s,l,t)
253
254/*----------------------------------------------------------------------------*/
255
256
257#define ps_color(s,r,g,b,t)
258#ifdef XXX
259void ps_color( int style, float red, float green, float blue, STATUS *status );
260
261/* sets color of style block "style"
262 *
263 * parameters of routine
264 * int        style;            input; style block number
265 * float      red, green, blue; input; red, green and blue intensities (0..1)
266 * STATUS     *status;          output; return status
267 */
268#endif
269
270/*----------------------------------------------------------------------------*/
271
272
273void ps_setpar( char item[], char value[], STATUS *status );
274
275/* sets hardcopy parameters
276 *
277 * parameters of routine
278 * char       item[];     input; item to be set
279 * char       value[];    input; new value of item
280 * STATUS     *status;    output; return status
281 */
282
283
284/*----------------------------------------------------------------------------*/
285
286
287#define ps_aspectratio() 1.0
288#ifdef XXX
289float ps_aspectratio();
290
291/* returns ratio of width to height of output
292 * no parameters
293 */
294#endif
295
296/*----------------------------------------------------------------------------*/
297
298
299void ps_arrayswap( BOOLEAN on_off );
300
301/* switches array-swap on or off
302 *
303 * parameter of routine
304 * BOOLEAN   on_off;     TRUE=on, FALSE=off
305 */
306
307
308/*----------------------------------------------------------------------------*/
309
310
311
312#else  /* BC_G_POSTSCRIPT */
313
314
315
316#define ps_init(a,x,y,w,h,s)
317#define ps_exit()
318#define ps_finish()
319#define ps_resize(x,y,w,h,s)
320#define ps_erase()
321#define ps_prepare(s)
322#define ps_cleanup(f,s)
323#define ps_setcoo(x,y,w,h,s)
324#define ps_moveto(x,y)
325#define ps_drawto(s,x,y)
326#define ps_arrayplot(s,c,r,o,i,f,y,z,x)
327#define ps_text(s,x,y,t)
328#define ps_setstyle(s,i,v,x)
329#define ps_set_outputdir(d,s)
330#define ps_set_inputdir(d,s)
331
332#define ps_charsize(s,x,t)
333#define ps_linestyle(s,l,t)
334#define ps_linewidth(s,l,t)
335#define ps_color(s,r,g,b,t)
336#define ps_setpar(i,v,s)
337#define ps_aspectratio() 1.0
338#define ps_arrayswap(o)
339
340
341
342#endif /* BC_G_POSTSCRIPT */
343
344#endif /* __PSUSRDEF */
345
Note: See TracBrowser for help on using the repository browser.