|
|
1.1 ! root 1: /* ! 2: * The following pswrap functions are used by YapOutput in the Yap program... ! 3: * By: Ali Ozer ! 4: * ! 5: * You may freely copy, distribute and reuse the code in this example. ! 6: * NeXT disclaims any warranty of any kind, expressed or implied, ! 7: * as to its fitness for any particular use. ! 8: */ ! 9: ! 10: defineps GetUserTime (| int *utime) ! 11: yaptime utime ! 12: endps ! 13: ! 14: /* ! 15: * GetFocus gets the bbox of the current clippath, the ctm, and ! 16: * current win number. ReFocus focuses given these values. ! 17: */ ! 18: ! 19: defineps GetFocus(|float *llx; float *lly, *urx, *ury, ctm[6]; int *win) ! 20: gsave clippath pathbbox ury urx lly llx grestore ! 21: matrix currentmatrix {ctm} forall ! 22: currentwindow win ! 23: endps ! 24: ! 25: defineps ReFocus(int win; float ctm[6]; float llx, lly, urx, ury) ! 26: win windowdeviceround % focus on this window ! 27: ctm setmatrix % set up the matrix ! 28: newpath % reestablish the clip path ! 29: llx lly moveto ! 30: llx ury lineto ! 31: urx ury lineto ! 32: urx lly lineto ! 33: closepath clip ! 34: newpath ! 35: endps ! 36:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.