1: /* 2: * Interpress utilities 3: * 4: * Copyright (c) 1984, 1985 Xerox Corp. 5: * 6: * Written for Xerox Corporation by William LeFebvre 7: * 31-May-1984 8: * 9: * History: 10: * 26-apr-85 ed flint add macros to set standard imager variables 11: */ 12: 13: /* 14: * Subroutines to help build interpress files: 15: * 16: * operator interface level - these routines call routines at the literal 17: * interface level to provide an easy way to 18: * write operators along with their parameters. 19: */ 20: 21: /* 22: * These routines are all deined with macros that call low level routines 23: * found in operator.c. 24: */ 25: 26: # define Abs(n) op_n(OP_abs, n) 27: # define Add(n1,n2) op_nn(OP_add, n1, n2) 28: # define And(i1,i2) op_ii(OP_and, (long) i1, (long) i2) 29: # define Ceiling(n) op_n(OP_ceiling, n) 30: # define Copy(i) op_i(OP_copy, (long) i) 31: # define CorrectSpace(n1,n2) op_nn(OP_correctspace, n1, n2) 32: # define Div(n1,n2) op_nn(OP_div, n1, n2) 33: # ifdef anyop 34: # define Dup(a) op_a(OP_dup, a) 35: # define Eq(a1,a2) op_aa(OP_eq, a1, a2) 36: # define Exch(a1,a2) op_aa(OP_exch, a1, a2) 37: # endif 38: # define Fget(i) op_i(OP_fget, (long) i) 39: # define Floor(n) op_n(OP_floor, n) 40: # ifdef anyop 41: # define Fset(a,i) op_ai(OP_fset, a, (long) i) 42: # endif 43: # define Ge(n1,n2) op_nn(OP_ge, n1, n2) 44: # define Get(n) op_n(OP_get, n) 45: # define Gt(n1,n2) op_nn(OP_gt, n1, n2) 46: # define Iget(i) op_i(OP_iget, (long) i) 47: # ifdef anyop 48: # define Iset(a,i) op_ai(OP_iset, a, (long) i) 49: # endif 50: # define Lineto(n1,n2) op_nn(OP_lineto, n1, n2) 51: # define Linetox(n) op_n(OP_linetox, n) 52: # define Linetoy(n) op_n(OP_linetoy, n) 53: # define Makegray(n) op_n(OP_makegray, n) 54: # define Makeoutline(i) op_i(OP_makeoutline, (long) i) 55: # define Makesampledblack(i) op_i(OP_makesampledblack, (long) i) 56: # define Makevec(i) op_i(OP_makevec, (long) i) 57: # define Makeveclu(i1,i2) op_ii(OP_makeveclu, (long) i1, (long) i2) 58: # define Mark(i) op_i(OP_mark, (long) i) 59: # define Maskrectangle(n1,n2,n3,n4) op_nnnn(OP_maskrectangle,n1,n2,n3,n4) 60: # define Masktrapezoidx(n1,n2,n3,n4,n5,n6) \ 61: op_nnnnnn(OP_masktrapezoidx,n1,n2,n3,n4,n5,n6) 62: # define Masktrapezoidy(n1,n2,n3,n4,n5,n6) \ 63: op_nnnnnn(OP_masktrapezoidy,n1,n2,n3,n4,n5,n6) 64: # define Maskunderline(n1,n2) op_nn(OP_maskunderline, n1, n2) 65: # define Maskvector(n1,n2,n3,n4) op_nnnn(OP_maskvector,n1,n2,n3,n4) 66: # define Mod(n1,n2) op_nn(OP_mod, n1, n2) 67: # define Moveto(n1,n2) op_nn(OP_moveto, n1, n2) 68: # define Mul(n1,n2) op_nn(OP_mul, n1, n2) 69: # define Neg(n) op_n(OP_neg, n) 70: # define Not(i) op_i(OP_not, (long) i) 71: # define Or(i1,i2) op_ii(OP_or, (long) i1, (long) i2) 72: # ifdef anyop 73: # define Pop(a) op_a(OP_pop, a) 74: # endif 75: # define Rem(n1,n2) op_nn(OP_rem, n1, n2) 76: # define Roll(i1,i2) op_ii(OP_roll, (long) i1, (long) i2) 77: # define Rotate(n) op_n(OP_rotate, n) 78: # define Round(n) op_n(OP_round, n) 79: # define Scale(n) op_n(OP_scale, n) 80: # define Scale2(n1,n2) op_nn(OP_scale2, n1, n2) 81: # define Setamplifyspace(n) op_ni(OP_iset, n, (long) I_amplifySpace) 82: # define Setcorrectmeasure(n1,n2) op_nn(OP_setcorrectmeasure, n1, n2) 83: # define Setcorrectpass(i) op_ii(OP_iset, (long) i, (long) I_correctPass) 84: # define Setcorrectshrink(n) op_ni(OP_iset, n, (long) I_correctShrink) 85: # define Setcorrecttolerance(n1,n2) op_nn(OP_setcorrecttolerance, n1, n2) 86: # define Setfont(i) op_i(OP_setfont, (long) i) 87: # define Setgray(n) op_n(OP_setgray, n) 88: # define Setnoimage(i) op_ii(OP_iset, (long) i, (long) I_noImage) 89: # define Setpriorityimportant(i) op_ii(OP_iset, (long) i, (long) I_priorityImportant) 90: # define Setstrokeend(i) op_ii(OP_iset, (long) i, (long) I_strokeEnd) 91: # define Setstrokewidth(n) op_ni(OP_iset, n, (long) I_strokeWidth) 92: # define Setunderlinestart(n) op_ni(OP_iset, n, (long) I_underlineStart) 93: # define Setxrel(n) op_n(OP_setxrel, n) 94: # define Setxy(n1,n2) op_nn(OP_setxy, n1, n2) 95: # define Setxyrel(n1,n2) op_nn(OP_setxyrel, n1, n2) 96: # define Setyrel(n) op_n(OP_setyrel, n) 97: # define Space(n) op_n(OP_space, n) 98: # define Sub(n1,n2) op_nn(OP_sub, n1, n2) 99: # define Translate(n1,n2) op_nn(OP_translate, n1, n2) 100: # define Trunc(n) op_n(OP_trunc, n) 101: # ifdef anyop 102: # define Type(a) op_a(OP_type, a) 103: # endif 104: # define Unmark(i) op_i(OP_unmark, (long) i)