|
|
1.1 root 1: defineps loadPSProcedures()
2: /Rectfill { 0 0 4 2 roll rectfill } bind def
3: endps
4:
5:
6: defineps tweakWindow(userobject windowNum ; int level)
7:
8: % tweaks a window so it works as a background window
9:
10: level windowNum setwindowlevel
11: true windowNum setautofill
12:
13: gsave
14: windowNum windowdeviceround
15: 0 setgray
16: setexposurecolor
17: grestore
18:
19: endps
20:
21:
22: defineps PSWmakeWindowGray(userobject windowNum)
23:
24: % sets a windows tier to level
25: gsave
26: windowNum windowdeviceround
27: 0.333 setgray
28: setexposurecolor
29: grestore
30:
31: endps
32:
33:
34: defineps PSWDefineFont(char *fontname)
35:
36: 9 dict dup begin
37: /FontName /fontname def
38: /FontType 3 def
39: /FontMatrix [1 0 0 1 0 0] def
40: /FontBBox [0 0 7 7] def
41:
42:
43: /Encoding 256 array def
44: 0 1 255 {Encoding exch /.notdef put} for
45:
46: Encoding
47: dup (a) 0 get /az put
48: dup (b) 0 get /bz put
49: dup (c) 0 get /cz put
50: dup (d) 0 get /dz put
51: dup (e) 0 get /ez put
52: dup (f) 0 get /fz put
53: dup (g) 0 get /gz put
54: dup (h) 0 get /hz put
55: dup (i) 0 get /iz put
56: dup (j) 0 get /jz put
57: dup (k) 0 get /kz put
58: (l) 0 get /lz put
59:
60: /CharProcs 14 dict def
61: CharProcs begin
62: /.notdef { } def
63: /az {1 1 Rectfill} bind def
64: /bz {2 1 Rectfill} bind def
65: /cz {2 2 Rectfill} bind def
66: /dz {3 2 Rectfill} bind def
67: /ez {3 3 Rectfill} bind def
68: /fz {3 3 Rectfill} bind def
69:
70: /gz {3 4 moveto 3 4 lineto stroke} bind def
71: /hz {2 4 moveto 3 4 lineto 3 5 lineto stroke} bind def
72: /iz {2 4 moveto 4 4 lineto 3 3 moveto 3 5 lineto stroke} bind def
73: /jz {1 4 moveto 5 4 lineto 3 2 moveto 3 6 lineto stroke} bind def
74: /kz {1 4 moveto 5 4 lineto 3 2 moveto 3 6 lineto
75: 2 3 moveto 4 5 lineto 2 5 moveto 4 3 lineto stroke} bind def
76: /lz {0 4 moveto 6 4 lineto 3 1 moveto 3 7 lineto
77: 2 3 moveto 4 5 lineto 2 5 moveto 4 3 lineto stroke} bind def
78: end
79:
80: /BuildGlyph
81: {
82: 7 0
83: 0 0 7 7 setcachedevice
84: true setstrokeadjust
85: exch /CharProcs get exch
86: 2 copy known not {pop /.notdef } if
87: get exec
88: } bind def
89:
90: /BuildChar
91: {
92: 1 index /Encoding get exch get
93: 1 index /BuildGlyph get exec
94: } bind def
95:
96: % currentdict
97: end
98:
99: /fontname exch definefont pop
100: endps
101:
102:
103:
104: defineps PSWXYShow (float X, Y; char *CharString; float XYScratch[j]; int j)
105: X Y moveto (CharString) XYScratch xyshow
106: endps
107:
108: defineps PSWorkspaceWindow(|float *x,*y,*w,*h)
109: workspaceWindow currentwindowbounds h w y x
110: endps
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.