Files: 4820fa19862722663667a28a0fb741b17c440cc5 / common.ps
1127 bytesRaw
1 | %!PS-Adobe-3.0 |
2 | %%Title: some shared code |
3 | %%LanguageLevel: 2 |
4 | %%EndComments |
5 | %%BeginProlog |
6 | |
7 | /inch {72 mul} def |
8 | /CardWidth {3.5 inch} def |
9 | /CardHeight {2 inch} def |
10 | |
11 | /centershow { |
12 | dup |
13 | stringwidth pop 2 div neg 0 rmoveto |
14 | show |
15 | } bind def |
16 | |
17 | /wrapshow { |
18 | /height exch def |
19 | /len exch def |
20 | { |
21 | dup length len lt { |
22 | show |
23 | exit |
24 | } { |
25 | dup % str str |
26 | 0 len getinterval % str strstart |
27 | dup show |
28 | stringwidth pop neg height neg rmoveto |
29 | dup length len sub len exch getinterval |
30 | } ifelse |
31 | } loop |
32 | } def |
33 | |
34 | /id2wrapshow { |
35 | /height exch def |
36 | dup 0 27 getinterval |
37 | dup show |
38 | stringwidth pop neg height neg rmoveto |
39 | ( ) show |
40 | 27 26 getinterval show |
41 | } def |
42 | |
43 | /DrawEPS { |
44 | /filename exch def |
45 | /z exch def |
46 | /bottom exch def |
47 | /left exch def |
48 | save |
49 | left bottom translate |
50 | z z scale |
51 | /showpage { } def |
52 | filename run |
53 | |
54 | % see PLRM.pdf page 732 |
55 | 0 setgray |
56 | 0 setlinecap |
57 | 1 setlinewidth |
58 | 0 setlinejoin |
59 | 10 setmiterlimit |
60 | [ ] 0 setdash newpath |
61 | /languagelevel where { |
62 | pop languagelevel 1 ne { |
63 | false setstrokeadjust |
64 | false setoverprint |
65 | } if |
66 | } if |
67 | |
68 | %/Dict_Count countdictstack def |
69 | %/Op_Count count def |
70 | %begin |
71 | |
72 | %end |
73 | %count |
74 | restore |
75 | } def |
76 |
Built with git-ssb-web