1 | % Start of ps4014.pro -- prolog for Tektronics 4014 translator |
---|
2 | % Copyright (c) 1985,1987 Adobe Systems Incorporated. All Rights Reserved. |
---|
3 | % GOVERNMENT END USERS: See Notice file in TranScript library directory |
---|
4 | % -- probably /usr/lib/ps/Notice |
---|
5 | % RCS: $Header: /afs/dev.mit.edu/source/repository/third/transcript/lib/ps4014.pro,v 1.1.1.1 1996-10-07 20:25:31 ghudson Exp $ |
---|
6 | save /ps4014sav exch def |
---|
7 | /inch{72 mul}def |
---|
8 | /xHome 0 def |
---|
9 | /yHome 3071 def |
---|
10 | /xLeftMarg 0 def |
---|
11 | /m /moveto load def |
---|
12 | /l /lineto load def |
---|
13 | /rl /rlineto load def |
---|
14 | /r /rmoveto load def |
---|
15 | /s /stroke load def |
---|
16 | /ml {/sychar exch def AryOfDxSpace sychar get neg 0 rmoveto} def |
---|
17 | /mr {/sychar exch def AryOfDxSpace sychar get 0 rmoveto} def |
---|
18 | /mu {/sychar exch def 0 AryOfDySpace sychar get rmoveto} def |
---|
19 | /md {/sychar exch def 0 AryOfDySpace sychar get neg rmoveto} def |
---|
20 | /cr1 {/sychar exch def |
---|
21 | xLeftMarg currentpoint exch pop AryOfDySpace sychar get sub moveto} def |
---|
22 | /cr2 {xLeftMarg currentpoint exch pop moveto} def |
---|
23 | /sh /show load def |
---|
24 | % scale the coordinate space |
---|
25 | % input: size of image area (x, y) in inches |
---|
26 | /ScaleCoords {72 4096 dxWidInch div div 72 3120 dyHtInch div div scale} def |
---|
27 | /AryOfDxSpace [56 51 34 31] def |
---|
28 | /AryOfDySpace [90 81 53 48] def |
---|
29 | /AryOfDyBaseLine [ 0 0 0 0 ] def % filled in at init time |
---|
30 | % input: character style index |
---|
31 | /SetCharStyle |
---|
32 | {/sychar exch def typeface findfont |
---|
33 | AryOfDySpace sychar get scalefont setfont |
---|
34 | } def |
---|
35 | /AryOfDashSolid [] def |
---|
36 | /AryOfDashDotted [12 24] def |
---|
37 | /AryOfDashDotDash [12 24 96 24] def |
---|
38 | /AryOfDashShortDash [24 24] def |
---|
39 | /AryOfDashLongDash [144 24] def |
---|
40 | /AryOfAryOfDash |
---|
41 | [AryOfDashSolid AryOfDashDotted AryOfDashDotDash |
---|
42 | AryOfDashShortDash AryOfDashLongDash] def |
---|
43 | % input: line style index |
---|
44 | /SetLineStyle |
---|
45 | {AryOfAryOfDash exch get dup length setdash } def |
---|
46 | /SetAryOfDyBaseLine |
---|
47 | {/mxT matrix def |
---|
48 | /fontT typeface findfont def |
---|
49 | 0 1 AryOfDyBaseLine length 1 sub |
---|
50 | {/sycharT exch def |
---|
51 | % transform dyBaseline into user space at current font size |
---|
52 | AryOfDyBaseLine sycharT |
---|
53 | 0 fontT /FontBBox get 1 get % stack = (0 dyBaseline) |
---|
54 | AryOfDySpace sycharT get dup mxT scale |
---|
55 | fontT /FontMatrix get mxT concatmatrix |
---|
56 | dtransform |
---|
57 | exch pop put |
---|
58 | } for |
---|
59 | } def |
---|
60 | /typeface /Courier def % Should be fixed pitch |
---|
61 | SetAryOfDyBaseLine |
---|
62 | % end of 4014 prologue |
---|