| 1 | % | 
|---|
| 2 | % PostScript encapulator prolog file of the BLT "eps" canvas item. | 
|---|
| 3 | % | 
|---|
| 4 | % Copyright 1991-1997 Bell Labs Innovations for Lucent Technologies. | 
|---|
| 5 | % | 
|---|
| 6 | % Permission to use, copy, modify, and distribute this software and its | 
|---|
| 7 | % documentation for any purpose and without fee is hereby granted, provided | 
|---|
| 8 | % that the above copyright notice appear in all copies and that both that the | 
|---|
| 9 | % copyright notice and warranty disclaimer appear in supporting documentation, | 
|---|
| 10 | % and that the names of Lucent Technologies any of their entities not be used | 
|---|
| 11 | % in advertising or publicity pertaining to distribution of the software | 
|---|
| 12 | % without specific, written prior permission. | 
|---|
| 13 | % | 
|---|
| 14 | % Lucent Technologies disclaims all warranties with regard to this software, | 
|---|
| 15 | % including all implied warranties of merchantability and fitness.  In no event | 
|---|
| 16 | % shall Lucent Technologies be liable for any special, indirect or | 
|---|
| 17 | % consequential damages or any damages whatsoever resulting from loss of use, | 
|---|
| 18 | % data or profits, whether in an action of contract, negligence or other | 
|---|
| 19 | % tortuous action, arising out of or in connection with the use or performance | 
|---|
| 20 | % of this software. | 
|---|
| 21 | % | 
|---|
| 22 |  | 
|---|
| 23 | % | 
|---|
| 24 | % The definitions of the next two macros are from Appendix H of | 
|---|
| 25 | % Adobe's "PostScript Language Reference Manual" pp. 709-736. | 
|---|
| 26 | % | 
|---|
| 27 |  | 
|---|
| 28 | % Prepare for EPS file | 
|---|
| 29 |  | 
|---|
| 30 | /BeginEPSF { | 
|---|
| 31 | /beforeInclusionState save def | 
|---|
| 32 | /dictCount countdictstack def         % Save the # objects in the dictionary | 
|---|
| 33 | /opCount count 1 sub def              % Count object on operator stack | 
|---|
| 34 | userdict begin                        % Make "userdict" the current | 
|---|
| 35 | % dictionary | 
|---|
| 36 | /showpage {} def                    % Redefine showpage to be null | 
|---|
| 37 | 0 setgray | 
|---|
| 38 | 0 setlinecap | 
|---|
| 39 | 1 setlinewidth | 
|---|
| 40 | 0 setlinejoin | 
|---|
| 41 | 10 setmiterlimit | 
|---|
| 42 | [] 0 setdash | 
|---|
| 43 | newpath | 
|---|
| 44 | /languagellevel where { | 
|---|
| 45 | pop languagelevel | 
|---|
| 46 | 1 ne { | 
|---|
| 47 | false setstrokeadjust false setoverprint | 
|---|
| 48 | } if | 
|---|
| 49 | } if | 
|---|
| 50 | % note: no "end" | 
|---|
| 51 | } bind def | 
|---|
| 52 |  | 
|---|
| 53 | /EndEPSF { %def | 
|---|
| 54 | count opCount sub { | 
|---|
| 55 | pop | 
|---|
| 56 | } repeat | 
|---|
| 57 | countdictstack dictCount sub { | 
|---|
| 58 | end                                   % Clean up dictionary stack | 
|---|
| 59 | } repeat | 
|---|
| 60 | beforeInclusionState restore | 
|---|
| 61 | } bind def | 
|---|
| 62 |  | 
|---|
| 63 |  | 
|---|
| 64 | % | 
|---|
| 65 | % Set up a clip region based upon a bounding box (x1, y1, x2, y2). | 
|---|
| 66 | % | 
|---|
| 67 | /SetClipRegion { | 
|---|
| 68 | % Stack: x1 y1 x2 y2 | 
|---|
| 69 | newpath | 
|---|
| 70 | 4 2 roll moveto | 
|---|
| 71 | 1 index 0 rlineto | 
|---|
| 72 | 0 exch rlineto | 
|---|
| 73 | neg 0 rlineto | 
|---|
| 74 | closepath | 
|---|
| 75 | clip | 
|---|
| 76 | newpath | 
|---|
| 77 | } def | 
|---|
| 78 |  | 
|---|