1 |
/* RCSid: $Id: imPfuncs.h,v 1.3 2003/11/15 02:13:37 schorsch Exp $ */ |
2 |
/* |
3 |
* imPfuncs - imPress functions |
4 |
* |
5 |
* Written by William LeFebvre, LCSE, Rice University |
6 |
* |
7 |
* This program can be freely redistributed to anyone, with the following |
8 |
* provisions: that this comment remain intact, and that no money is |
9 |
* charged or collected for that redistribution. |
10 |
*/ |
11 |
|
12 |
/* |
13 |
* These functions are part of the imPress functional interface routines. |
14 |
*/ |
15 |
#ifndef _RAD_IMPFUNCS_H_ |
16 |
#define _RAD_IMPFUNCS_H_ |
17 |
|
18 |
#include <varargs.h> |
19 |
|
20 |
#ifdef __cplusplus |
21 |
extern "C" { |
22 |
#endif |
23 |
|
24 |
#define im_putbyte(c) putc((c) & 0377, imout) |
25 |
#define im_putword(w) (im_putbyte((w) >> 8), im_putbyte(w)) |
26 |
|
27 |
#define im_b(code, b) (putc(code, imout), im_putbyte(b)) |
28 |
|
29 |
/* function definitions for imPress commands */ |
30 |
|
31 |
#define imBrule(wa, wb, wc) im_www(imP_BRULE, wa, wb, wc) |
32 |
#define imCircArc(wa, wb, wc) im_www(imP_CIRC_ARC, wa, wb, wc) |
33 |
#define imCircSegm(wa, wb, wc, wd, we) \ |
34 |
im_wwwww(imP_CIRC_SEGM, wa, wb, wc, wd, we) |
35 |
#define imCrLf() putc(imP_CRLF, imout) |
36 |
#define imDrawPath(b) im_b(imP_DRAW_PATH, b) |
37 |
#define imEllipseArc(wa, wb, wc, wd, we) \ |
38 |
im_wwwww(imP_ELLIPSE_ARC, wa, wb, wc, wd, we) |
39 |
#define imEndPage() putc(imP_ENDPAGE, imout) |
40 |
#define imEof() putc(imP_EOF, imout) |
41 |
#define imFillPath(b) im_b(imP_FILL_PATH, b) |
42 |
#define imMminus() putc(imP_MMINUS, imout) |
43 |
#define imMmove(w) im_w(imP_MMOVE, w) |
44 |
#define imMplus() putc(imP_MPLUS, imout) |
45 |
#define imMplus() putc(imP_MPLUS, imout) |
46 |
#define imNoOp() putc(imP_NO_OP, imout) |
47 |
#define imPage() putc(imP_PAGE, imout) |
48 |
#define imPop() putc(imP_POP, imout) |
49 |
#define imPush() putc(imP_PUSH, imout) |
50 |
#define imSetAbsH(w) im_w(imP_SET_ABS_H, w) |
51 |
#define imSetAbsV(w) im_w(imP_SET_ABS_V, w) |
52 |
#define imSetAdvDirs(b2, b1) im_21(imP_SET_ADV_DIRS, b2, b1) |
53 |
#define imSetBol(w) im_w(imP_SET_BOL, w) |
54 |
#define imSetFamily(b) im_b(imP_SET_FAMILY, b) |
55 |
#define imSetHVSystem(b2o, b2a, b3) im_223(imP_SET_HV_SYSTEM, b2o, b2a, b3) |
56 |
#define imSetIl(w) im_w(imP_SET_IL, w) |
57 |
#define imSetMagnification(b) im_b(imP_SET_MAGN, b) |
58 |
#define imSetPen(b) im_b(imP_SET_PEN, b) |
59 |
#define imSetPum(b1) im_b(imP_SET_PUM, b1) |
60 |
#define imSetPushMask(w) im_w(imP_SET_PUSH_MASK, w) |
61 |
#define imSetRelH(w) im_w(imP_SET_REL_H, w) |
62 |
#define imSetRelV(w) im_w(imP_SET_REL_V, w) |
63 |
#define imSetSp(w) im_w(imP_SET_SP, w) |
64 |
#define imSetTexture(b7a, b7b) im_77(imP_SET_TEXTURE, b7a, b7b) |
65 |
#define imSmove(w) im_w(imP_SMOVE, w) |
66 |
#define imSp() putc(imP_SP, imout) |
67 |
#define imSp1() putc(imP_SP1, imout) |
68 |
|
69 |
/* Push mask defines: */ |
70 |
|
71 |
#define imPM_PEN_TEXTURE 0x100 |
72 |
#define imPM_SP 0x080 |
73 |
#define imPM_IL 0x040 |
74 |
#define imPM_BOL 0x020 |
75 |
#define imPM_FAMILY 0x010 |
76 |
#define imPM_HV_POS 0x008 |
77 |
#define imPM_ADV_DIRS 0x004 |
78 |
#define imPM_ORIGIN 0x002 |
79 |
#define imPM_ORIENTATION 0x001 |
80 |
|
81 |
extern FILE *imout; |
82 |
|
83 |
extern void im_w(int code, unsigned int w); |
84 |
extern void im_223(int code,unsigned int b2a,unsigned int b2b,unsigned int b3); |
85 |
extern void im_77(int code, unsigned int b7a, unsigned int b7b); |
86 |
/* extern void imCreateFamilyTable(char *s, ...); */ /* XXX */ |
87 |
/* extern void imCreatePath(char *s, ...); */ /* XXX */ |
88 |
extern void imCreatePathV(unsigned int count, unsigned int *vec); |
89 |
extern void imInit(void); |
90 |
|
91 |
#ifdef __cplusplus |
92 |
} |
93 |
#endif |
94 |
#endif /* _RAD_IMPFUNCS_H_ */ |
95 |
|