Old test.ps
1 %!PS-Adobe-2.0
2 %%Title: TeX output 1990.08.22:1726
3 %%Creator: DVILASER/PS, ArborText, Inc.
4 %%BoundingBox: (atend)
5 %%Pages: (atend)
6 %%DocumentFonts: (atend)
7 %%EndComments
8
9 %!
10 % Dvips.pro - included prolog for DviLaser-generated PostScript files.
11 %
12 % Copyright (c) 1986-89, ArborText, Inc.
13 % Permission to copy is granted so long as the PostScript code
14 % is not resold or used in a commercial product.
15 %
16 % $Header: dvips.pro.dist,v 1.17 90/05/25 10:47:18 jsg Exp $
17
18 systemdict /setpacking known % use array packing mode if its available
19 {/savepackingmode currentpacking def
20 true setpacking}
21 if
22
23 /$DviLaser 400 dict def
24
25 % Begin document
26 /BeginDviLaserDoc {
27 vmstatus pop pop 0 eq
28 { $DviLaser begin
29 InitializeState }
30 { /DviLaserJob save def
31 $DviLaser begin
32 InitializeState
33 /DviLaserFonts save def }
34 ifelse
35 } bind def
36
37 % End document
38 /EndDviLaserDoc {
39 vmstatus pop pop 0 eq
40 { end }
41 { DviLaserFonts restore
42 end
43 DviLaserJob restore }
44 ifelse
45 } bind def
46
47 $DviLaser begin
48
49 /tempstr 64 string def
50 /tempint 0 def
51 /tempmatrix matrix def
52
53 %
54 % Debugging routines
55 %
56 /DebugMode false def
57
58 /PrintInt {
59 tempstr cvs print
60 } bind def
61
62 /PrintLn {
63 (\n) print flush
64 } bind def
65
66 /PrintVMStats {
67 print
68 PrintLn
69 (VM status - ) print
70 vmstatus
71 3 copy
72 PrintInt (\(total\), ) print
73 PrintInt (\(used\), ) print
74 pop
75 exch sub
76 PrintInt (\(remaining\), ) print
77 PrintInt (\(level\)) print
78 PrintLn
79 } bind def
80
81 /VMS /PrintVMStats load def
82
83 /VMSDebug {
84 DebugMode
85 {PrintVMStats}
86 {pop}
87 ifelse
88 } bind def
89
90 (beginning of common prolog) VMSDebug
91
92 % Make it easy to bind definitions.
93 /bdef { bind def } bind def
94 /xdef { exch def } bdef
95
96 % Begin page
97 /BP {
98 /Magnification xdef
99 /DviLaserPage save def
100 (beginning of page) VMSDebug
101 } bdef
102
103 % End page
104 /EP {
105 DviLaserPage restore
106 } bdef
107
108 % Exit page (temporarily) to add fonts/characters.
109 /XP {
110 % Save current point information so it can be reset later.
111 /Xpos where {pop Xpos} {0} ifelse
112 /Ypos where {pop Ypos} {0} ifelse
113 /currentpoint cvx stopped {0 0 moveto currentpoint} if
114 /DviLaserPage where {pop DviLaserPage restore} if
115 moveto
116 /Ypos xdef
117 /Xpos xdef
118 } bdef
119
120 % Resume page
121 /RP {
122 /DviLaserPage save def
123 } bdef
124
125 % Purge all fonts to reclaim memory space.
126 /PF {
127 GlobalMode
128 LocalMode
129 } bdef
130
131 % Switch to base save/restore level, saving state information.
132 /GlobalMode {
133 /UserSave where {pop UserSave} if % invoke "UserSave" if available
134 PortraitMode
135 PaperWidth
136 PaperHeight
137 PxlResolution
138 Resolution
139 Magnification
140 Ymax
141 RasterScaleFactor
142 % Save current point information so it can be reset later.
143 /currentpoint cvx stopped {0 0 moveto currentpoint} if
144 /DviLaserPage where {pop DviLaserPage restore} if
145 DviLaserFonts restore
146 RecoverState
147 } bdef
148
149 % Preserve state at the base level.
150 /RecoverState {
151 10 copy
152 /Ypos xdef
153 /Xpos xdef
154 /RasterScaleFactor xdef
155 /Ymax xdef
156 /Magnification xdef
157 /Resolution xdef
158 /PxlResolution xdef
159 /PaperHeight xdef
160 /PaperWidth xdef
161 /PortraitMode xdef
162 DoInitialScaling
163 PortraitMode not {PaperWidth 0 SetupLandscape} if
164 Xpos Ypos moveto
165 } bdef
166
167 % Initialize state variables to default values.
168 /InitializeState {
169 /Resolution 3600.0 def
170 /PxlResolution 300.0 def
171 /RasterScaleFactor PxlResolution Resolution div def
172 /PortraitMode true def
173 11.0 Resolution mul /PaperHeight xdef
174 8.5 Resolution mul /PaperWidth xdef
175 /Ymax PaperHeight def
176 /Magnification 1000.0 def
177 /Xpos 0.0 def
178 /Ypos 0.0 def
179 /InitialMatrix matrix currentmatrix def
180 } bdef
181
182 % Switch from base save/restore level, restoring state information.
183 /LocalMode {
184 /Ypos xdef
185 /Xpos xdef
186 /RasterScaleFactor xdef
187 /Ymax xdef
188 /Magnification xdef
189 /Resolution xdef
190 /PxlResolution xdef
191 /PaperHeight xdef
192 /PaperWidth xdef
193 /PortraitMode xdef
194 DoInitialScaling
195 PortraitMode not {PaperWidth 0 SetupLandscape} if
196 Xpos Ypos moveto
197 /UserRestore where {pop UserRestore} if % invoke "UserRestore" if available
198 /DviLaserFonts save def
199 /DviLaserPage save def
200 } bdef
201
202 % Abbreviations
203 /S /show load def
204 /SV /save load def
205 /RST /restore load def
206
207 /Yadjust {Ymax exch sub} bdef
208
209 % (x,y) position absolute, just set Xpos & Ypos, don't move.
210 /SXY {
211 Yadjust
212 /Ypos xdef /Xpos xdef
213 } bdef
214
215 % (x,y) position absolute
216 /XY {
217 Yadjust
218 2 copy /Ypos xdef /Xpos xdef
219 moveto
220 } bdef
221
222 % (x,0) position absolute
223 /X {
224 currentpoint exch pop
225 2 copy /Ypos xdef /Xpos xdef
226 moveto
227 } bdef
228
229 % (0,y) position absolute
230 /Y {
231 currentpoint pop exch Yadjust
232 2 copy /Ypos xdef /Xpos xdef
233 moveto
234 } bdef
235
236 % (x,y) position relative
237 /xy {
238 neg rmoveto
239 currentpoint /Ypos xdef /Xpos xdef
240 } bdef
241
242 % (x,0) position relative
243 /x {
244 0.0 rmoveto
245 currentpoint /Ypos xdef /Xpos xdef
246 } bdef
247
248 % (0,y) position relative
249 /y {
250 0.0 exch neg rmoveto
251 currentpoint /Ypos xdef /Xpos xdef
252 } bdef
253
254 % Print a rule. In order to get correct pixel size and positioning,
255 % we usually create a temporary font in which the rule is the only character.
256 % When the rule is large, however, we fill a rectangle instead.
257 /R {
258 /ht xdef
259 /wd xdef
260 ht 1950 le wd 1950 le and
261 {save
262 /tfd 6 dict def
263 tfd begin
264 /FontType 3 def
265 /FontMatrix [1 0 0 1 0 0] def
266 /FontBBox [0 0 wd ht] def
267 /Encoding 256 array dup 97 /a put def
268 /BuildChar {
269 pop % ignore character code
270 pop % ignore font dict, too
271 wd 0 0 0 wd ht setcachedevice
272 wd ht true
273 [1 0 0 -1 0 ht] {<FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF>} imagemask
274 } def
275 end % tfd
276 /tf tfd definefont setfont
277 (a) show
278 restore
279 }
280 {gsave
281 0 setgray
282 currentpoint
283 newpath
284 moveto
285 0.0 ht rlineto
286 wd 0.0 rlineto
287 0.0 ht neg rlineto
288 wd neg 0.0 rlineto
289 closepath fill
290 grestore
291 }
292 ifelse
293 wd 0.0 rmoveto
294 currentpoint /Ypos xdef /Xpos xdef
295 } bdef
296
297 %
298 % <PXL-file resolution(pix/inch)> <resolution(pix/inch)> RES
299 %
300 /RES {
301 /Resolution xdef
302 /PxlResolution xdef
303 /RasterScaleFactor PxlResolution Resolution div def
304 DoInitialScaling
305 } bdef
306
307 %
308 % Do initial scaling.
309 %
310 /DoInitialScaling {
311 InitialMatrix setmatrix
312 72.0 Resolution div dup scale
313 } bdef
314
315 %
316 % <paper-height(pix)> <paper-width(pix)> PM
317 %
318 /PM {
319 XP
320 /PaperWidth xdef
321 /PaperHeight xdef
322 /Ymax PaperHeight def
323 /PortraitMode true def
324 DoInitialScaling
325 RP
326 } bdef
327
328 %
329 % <paper-height(pix)> <paper-width(pix)> LM
330 %
331 /LM {
332 XP
333 /PaperWidth xdef
334 /PaperHeight xdef
335 /Ymax PaperWidth def
336 /PortraitMode false def
337 DoInitialScaling
338 PaperWidth 0 SetupLandscape
339 RP
340 } bdef
341
342 % Change magnification setting
343 /MAG {
344 XP
345 /Magnification xdef
346 RP
347 } bdef
348
349 %
350 % Switch to landscape mode
351 %
352 /SetupLandscape {
353 translate
354 90.0 rotate
355 } bdef
356
357 %
358 % <mode> SPB - begin "\special" mode
359 %
360 % This is the PostScript procedure used to transfer from the internal
361 % environment used for the DVI translation code emitted by DVIPS to
362 % a standard PostScript environment.
363 %
364 % Parameters: 0 - Local
365 % 1 - Global
366 % 2 - Inline
367 %
368 /SPB {
369 /spc_mode xdef
370 spc_mode 0 eq spc_mode 2 eq or
371 {XP}
372 {spc_mode 1 eq {GlobalMode} if}
373 ifelse
374 Resolution 72.0 div dup scale % Restore default scaling...
375 Magnification 1000.0 div dup scale % Adjust for any magnification...
376 /Xpos Xpos 72.0 Resolution div mul 1000.0 Magnification div mul def
377 /Ypos Ypos 72.0 Resolution div mul 1000.0 Magnification div mul def
378 } bdef
379
380 %
381 % <mode> SPE - end "\special" mode
382 %
383 % This is the PostScript procedure used to reenter the internal
384 % environment used for the DVI translation code emitted by DVIPS from
385 % the standard PostScript environment provided for processing user-supplied
386 % PostScript code.
387 %
388 % Parameters: 0 - Local
389 % 1 - Global
390 % 2 - Inline
391 %
392 /SPE {
393 /spc_mode xdef
394 1000.0 Magnification div dup scale % Un-adjust for any magnification...
395 72.0 Resolution div dup scale % Restore default internal scaling...
396 spc_mode 0 eq spc_mode 2 eq or
397 {RP}
398 {spc_mode 1 eq {LocalMode} if}
399 ifelse
400 } bdef
401
402 %
403 % <num-copies> PP
404 %
405 /PP {
406 /#copies xdef
407 showpage
408 /#copies 1 def
409 } bdef
410
411 %
412 % /font-name <point-size(pix)> DMF
413 %
414 /DMF {
415 /psz xdef
416 /nam xdef
417 nam findfont psz scalefont setfont
418 } bdef
419
420 %
421 % /abcd (xxx) str-concat ==> /abcdxxx
422 %
423 /str-concatstr 64 string def
424
425 /str-concat {
426 /xxx xdef
427 /nam xdef
428 /namstr nam str-concatstr cvs def
429 /newnam namstr length xxx length add string def
430 newnam 0 namstr putinterval
431 newnam namstr length xxx putinterval
432 newnam cvn
433 } bdef
434
435 %
436 % /abcdef 2 str-strip ==> /cdef
437 %
438 /str-strip {
439 /num xdef
440 /nam xdef
441 /namstr nam tempstr cvs def
442 /newlen namstr length num sub def
443 namstr num newlen getinterval
444 cvn
445 } bdef
446
447 %
448 % <old-dict> copydict ==> new-dict on stack
449 %
450 /copydict {
451 dup length 1 add dict /newdict xdef
452 {1 index /FID ne
453 {newdict 3 1 roll put}
454 {pop pop}
455 ifelse
456 } forall
457 newdict
458 } bdef
459
460 %
461 % <font-type> DefineCMEncoding
462 %
463 /DefineCMEncoding {
464 /EncodeType xdef
465
466 /CMEncoding 256 array def
467 /Times-Roman findfont /Encoding get aload pop CMEncoding astore pop
468
469 EncodeType 11 eq {Do-CM-rm-encoding} if
470 EncodeType 12 eq {Do-CM-it-encoding} if
471 EncodeType 13 eq {Do-CM-tt-encoding} if
472 } bdef
473
474 %
475 % Do special mappings for the various CM-font types. Characters that
476 % get "covered up" are repositioned in the range (128,128+32).
477 %
478 /Do-standard-CM-encodings {
479 CMEncoding
480 dup 0 /.notdef put
481 dup 1 /.notdef put
482 dup 2 /.notdef put
483 dup 3 /.notdef put
484 dup 4 /.notdef put
485 dup 5 /.notdef put
486 dup 6 /.notdef put
487 dup 7 /.notdef put
488
489 dup 8 /.notdef put
490 dup 9 /.notdef put
491 dup 10 /.notdef put
492 dup 11 /.notdef put
493 dup 12 /fi put
494 dup 13 /fl put
495 dup 14 /.notdef put
496 dup 15 /.notdef put
497
498 dup 16 /dotlessi put
499 dup 17 /.notdef put
500 dup 18 /grave put
501 dup 19 /acute put
502 dup 20 /caron put
503 dup 21 /breve put
504 dup 22 /macron put
505 dup 23 /ring put
506
507 dup 24 /cedilla put
508 dup 25 /germandbls put
509 dup 26 /ae put
510 dup 27 /oe put
511 dup 28 /oslash put
512 dup 29 /AE put
513 dup 30 /OE put
514 dup 31 /Oslash put
515
516 dup 127 /dieresis put
517
518 dup 128 /space put
519 dup 129 /quotedbl put
520 dup 130 /sterling put
521 dup 131 /dollar put
522 dup 132 /less put
523 dup 133 /greater put
524 dup 134 /backslash put
525 dup 135 /asciicircum put
526
527 dup 136 /underscore put
528 dup 137 /braceleft put
529 dup 138 /bar put
530 dup 139 /braceright put
531 dup 140 /asciitilde put
532 pop
533 } bdef
534
535 /Do-CM-rm-encoding {
536 Do-standard-CM-encodings
537 CMEncoding
538 dup 32 /.notdef put
539 dup 34 /quotedblright put
540 dup 60 /exclamdown put
541 dup 62 /questiondown put
542 dup 92 /quotedblleft put
543 dup 94 /circumflex put
544 dup 95 /dotaccent put
545 dup 123 /endash put
546 dup 124 /emdash put
547 dup 125 /hungarumlaut put
548 dup 126 /tilde put
549 pop
550 } bdef
551
552 /Do-CM-it-encoding {
553 Do-standard-CM-encodings
554 CMEncoding
555 dup 32 /.notdef put
556 dup 34 /quotedblright put
557 dup 36 /sterling put
558 dup 60 /exclamdown put
559 dup 62 /questiondown put
560 dup 92 /quotedblleft put
561 dup 94 /circumflex put
562 dup 95 /dotaccent put
563 dup 123 /endash put
564 dup 124 /emdash put
565 dup 125 /hungarumlaut put
566 dup 126 /tilde put
567 pop
568 } bdef
569
570 /Do-CM-tt-encoding {
571 Do-standard-CM-encodings
572 CMEncoding
573 dup 12 /.notdef put
574 dup 13 /quotesingle put
575 dup 14 /exclamdown put
576 dup 15 /questiondown put
577 dup 94 /circumflex put
578 dup 126 /tilde put
579 pop
580 } bdef
581
582 %
583 % Routines to handle packing/unpacking numbers.
584 %
585 % <target> <pos> <num> PackHW --> <new target>
586 %
587 /PackHW {
588 /num xdef
589 /pos xdef
590 /target xdef
591 num 16#0000FFFF and 1 pos sub 16 mul bitshift
592 target or
593 } bdef
594
595 %
596 % <target> <pos> <num> PackByte --> <new target>
597 %
598 /PackByte {
599 /num xdef
600 /pos xdef
601 /target xdef
602 num 16#000000FF and 3 pos sub 8 mul bitshift
603 target or
604 } bdef
605
606 %
607 % <pos> <num> UnpkHW --> <unpacked value>
608 %
609 /UnpkHW {
610 /num xdef
611 /pos xdef
612 num 1 pos sub -16 mul bitshift 16#0000FFFF and
613 dup 16#00007FFF gt {16#00010000 sub} if
614 } bdef
615
616 %
617 % <pos> <num> UnpkByte --> <unpacked value>
618 %
619 /UnpkByte {
620 /num xdef
621 /pos xdef
622 num 3 pos sub -8 mul bitshift 16#000000FF and
623 dup 16#0000007F gt {16#00000100 sub} if
624 } bdef
625
626 %
627 % <int-font-name> <ext-font-name> <pt-sz(pix)> <type> <loaded-fg> DefineCMFont
628 %
629 % type 10: "as-is" PostScript font
630 % type 11: CM-mapped PostScript font - roman
631 % type 12: CM-mapped PostScript font - text italic
632 % type 13: CM-mapped PostScript font - typewriter type
633 %
634 /int-dict-name {int (-dict) str-concat} bdef
635 /int-dict {int (-dict) str-concat cvx load} bdef
636
637 /DF {
638 true % signal that the font is already loaded
639 DefineCMFont
640 } bdef
641
642 /DNF {
643 false % signal that the font is not already loaded
644 DefineCMFont
645 } bdef
646
647 /DefineCMFont {
648 /loaded xdef
649 /typ xdef
650 /psz xdef
651 /ext xdef
652 /int xdef
653
654 typ 10 ne
655 { % font_type = 11, 12, 13
656 loaded not
657 { /fnam ext 3 str-strip def
658 fnam findfont copydict /newdict xdef
659 typ DefineCMEncoding
660 newdict /Encoding CMEncoding put
661 ext newdict definefont pop
662 } if
663 int-dict-name ext findfont psz scalefont def
664 currentdict int [int-dict /setfont cvx] cvx put
665 }
666 { % font_type = 10
667 /fnam ext def
668 int-dict-name fnam findfont psz scalefont def
669 currentdict int [int-dict /setfont cvx] cvx put
670 }
671 ifelse
672 } bdef
673
674 %
675 % <int-font-name> <ext-font-name> <pt-sz(pix)> <PXL mag> <num-chars>
676 % [llx lly urx ury] <newfont-fg> DefinePXLFont
677 %
678
679 /PXLF {
680 true % signal that the font is already loaded
681 DefinePXLFont
682 } bdef
683
684 /PXLNF {
685 false % signal that the font is not already loaded
686 DefinePXLFont
687 } bdef
688
689 /PXLBuildCharDict 17 dict def
690
691 /CMEncodingArray 256 array def
692 0 1 255 {CMEncodingArray exch dup tempstr cvs cvn put} for
693
694 /RasterConvert {RasterScaleFactor div} bdef
695
696 /TransformBBox {
697 aload pop
698
699 /BB-ury xdef
700 /BB-urx xdef
701 /BB-lly xdef
702 /BB-llx xdef
703
704 [BB-llx RasterConvert BB-lly RasterConvert
705 BB-urx RasterConvert BB-ury RasterConvert]
706 } bdef
707
708 /DefinePXLFont {
709 /newfont xdef
710 /bb xdef
711 /num xdef
712 /psz xdef
713 /dsz xdef
714 /pxlmag xdef
715 /ext xdef
716 /int xdef
717
718 /fnam ext (-) str-concat pxlmag tempstr cvs str-concat def
719
720 newfont not {
721 int-dict-name 13 dict def
722
723 int-dict begin
724 /FontType 3 def
725 /FontMatrix [1 dsz div 0 0 1 dsz div 0 0] def
726 /FontBBox bb TransformBBox def
727 /Encoding CMEncodingArray def
728 /CharDict 1 dict def
729 CharDict begin
730 /Char-Info num array def
731 end
732
733 /BuildChar
734 {
735 PXLBuildCharDict begin
736 /char xdef
737 /fontdict xdef
738
739 fontdict /CharDict get /Char-Info get char get aload pop
740
741 /rasters xdef
742 /PackedWord1 xdef
743
744 0 PackedWord1 UnpkHW 16#7FFF ne
745 { /PackedWord2 xdef
746 /wx 0 PackedWord1 UnpkHW def
747 /rows 2 PackedWord1 UnpkByte def
748 /cols 3 PackedWord1 UnpkByte def
749 /llx 0 PackedWord2 UnpkByte def
750 /lly 1 PackedWord2 UnpkByte def
751 /urx 2 PackedWord2 UnpkByte def
752 /ury 3 PackedWord2 UnpkByte def }
753 { /PackedWord2 xdef
754 /PackedWord3 xdef
755 /PackedWord4 xdef
756 /wx 1 PackedWord1 UnpkHW def
757 /rows 0 PackedWord2 UnpkHW def
758 /cols 1 PackedWord2 UnpkHW def
759 /llx 0 PackedWord3 UnpkHW def
760 /lly 1 PackedWord3 UnpkHW def
761 /urx 0 PackedWord4 UnpkHW def
762 /ury 1 PackedWord4 UnpkHW def }
763 ifelse
764
765 rows 0 lt
766 { /rows rows neg def
767 /runlength 1 def }
768 { /runlength 0 def }
769 ifelse
770
771 wx 0
772 llx RasterConvert lly RasterConvert
773 urx RasterConvert ury RasterConvert setcachedevice
774 rows 0 ne
775 {
776 gsave
777 cols rows true
778 RasterScaleFactor 0 0 RasterScaleFactor neg llx neg ury
779 tempmatrix astore
780 {GenerateRasters} imagemask
781 grestore
782 } if
783 end
784 } def
785 end
786
787 fnam int-dict definefont pop
788 } if
789
790 int-dict-name fnam findfont psz scalefont def
791 currentdict int [int-dict /setfont cvx] cvx put
792 } bdef
793
794 %
795 % <int-font-name> <code> <wx> <llx> <lly> <urx> <ury> <rows> <cols> <runlength> <rasters> PXLC
796 %
797 /PXLC {
798
799 /rasters xdef
800 /runlength xdef
801 /cols xdef
802 /rows xdef
803 /ury xdef
804 /urx xdef
805 /lly xdef
806 /llx xdef
807 /wx xdef
808 /code xdef
809 /int xdef
810
811 % See if the long or short format is required
812 true cols CKSZ rows CKSZ ury CKSZ urx CKSZ lly CKSZ llx CKSZ
813 TackRunLengthToRows
814 { int-dict /CharDict get /Char-Info get code
815 [0 0 llx PackByte 1 lly PackByte 2 urx PackByte 3 ury PackByte
816 0 0 wx PackHW 2 rows PackByte 3 cols PackByte
817 rasters] put}
818 { int-dict /CharDict get /Char-Info get code
819 [0 0 urx PackHW 1 ury PackHW
820 0 0 llx PackHW 1 lly PackHW
821 0 0 rows PackHW 1 cols PackHW
822 0 0 16#7FFF PackHW 1 wx PackHW
823 rasters] put}
824 ifelse
825 } bdef
826
827 /CKSZ {abs 127 le and} bdef
828 /TackRunLengthToRows {runlength 0 ne {/rows rows neg def} if} bdef
829
830 %
831 % <wx> <dsz> <psz> <llx> <lly> <urx> <ury> <rows> <cols> <runlength> <rasters> PLOTC
832 %
833 /PLOTC {
834 /rasters xdef
835 /runlength xdef
836 /cols xdef
837 /rows xdef
838 /ury xdef
839 /urx xdef
840 /lly xdef
841 /llx xdef
842 /psz xdef
843 /dsz xdef
844 /wx xdef
845
846 % "Plot" a character's raster pattern.
847 rows 0 ne
848 {
849 gsave
850 currentpoint translate
851 psz dsz div dup scale
852 cols rows true
853 RasterScaleFactor 0 0 RasterScaleFactor neg llx neg ury
854 tempmatrix astore
855 {GenerateRasters} imagemask
856 grestore
857 } if
858 wx x
859 } bdef
860
861 % Routine to generate rasters for "imagemask".
862 /GenerateRasters {
863 rasters
864 runlength 1 eq {RunLengthToRasters} if
865 } bdef
866
867 % Routine to convert from runlength encoding back to rasters.
868 /RunLengthToRasters {
869 % ...not done yet...
870 } bdef
871
872 %
873 % These procedures handle bitmap processing.
874 %
875 % <bitmap columns> <bitmap rows> <bitmap pix/inch> <magnification> BMbeg
876 %
877 /BMbeg {
878 /BMmagnification xdef
879 /BMresolution xdef
880 /BMrows xdef
881 /BMcols xdef
882
883 /BMcurrentrow 0 def
884 gsave
885 0.0 setgray
886 Resolution BMresolution div dup scale
887 currentpoint translate
888 BMmagnification 1000.0 div dup scale
889 0.0 BMrows moveto
890 BMrows dup scale
891 currentpoint translate
892 /BMCheckpoint save def
893 } bdef
894
895 /BMend {
896 BMCheckpoint restore
897 grestore
898 } bdef
899
900 %
901 % <hex raster bitmap> <rows> BMswath
902 %
903 /BMswath {
904 /rows xdef
905 /rasters xdef
906
907 BMcols rows true
908 [BMrows 0 0 BMrows neg 0 BMcurrentrow neg]
909 {rasters}
910 imagemask
911
912 /BMcurrentrow BMcurrentrow rows add def
913 BMcurrentrow % save this on the stack around a restore...
914 BMCheckpoint restore
915 /BMcurrentrow xdef
916 /BMCheckpoint save def
917 } bdef
918
919 %
920 % Procedures for implementing the "rotate <theta>" special:
921 % <theta> ROTB -
922 % - ROTE -
923
924 /ROTB {
925 XP
926 gsave
927 Xpos Ypos translate
928 rotate % using <theta> from the stack
929 Xpos neg Ypos neg translate
930 RP
931 } bdef
932
933 /ROTE {XP grestore RP} bdef
934
935 %
936 % Procedures for implementing the "epsfile <filename> [<mag>]" special:
937 % <llx> <lly> <mag> EPSB -
938 % - EPSE -
939
940 /EPSB {
941 0 SPB
942 save
943 4 1 roll % push the savelevel below the parameters
944 /showpage {} def
945 Xpos Ypos translate
946 1000 div dup scale % using <mag> from the stack
947 neg exch neg exch translate % using <llx> <lly> from the stack
948 } bdef
949
950 /EPSE {restore 0 SPE} bdef
951
952 %
953 % Procedure for implementing revision bars:
954 % <bary1> <bary2> <barx> <barw> REVB -
955 % The bar is a line of width barw drawn from (barx,bary1) to (barx,bary2).
956
957 /REVB {
958 /barw xdef
959 /barx xdef
960 /bary2 xdef
961 /bary1 xdef
962 gsave
963 barw setlinewidth
964 barx bary1 Yadjust moveto
965 barx bary2 Yadjust lineto
966 stroke
967 grestore
968 } bdef
969
970 %
971 % A small array and two procedures to facilitate The Publisher's
972 % implementation of gray table cells:
973 % <ptnum> GRSP -
974 % <ultpnum> <lrptnum> <graylev> <freq> GRFB -
975 %
976 % GRSP saves the current DVI location so that it can be retrieved later
977 % by the index <ptnum>. GRFB fills a box whose corners are given by the
978 % indexes <ultpnum> and <lrptnum> with a halftone gray with the given
979 % level and frequency. The array GRPM holds the coordinates of points
980 % marking the corners of gray table cells.
981
982 /GRPM 40 dict def
983
984 /GRSP {GRPM exch [Xpos Ypos] put} bdef
985
986 /GRFB {
987 /GRfreq xdef
988 /GRgraylev xdef
989 GRPM exch get aload pop /GRlry xdef /GRlrx xdef
990 GRPM exch get aload pop /GRuly xdef /GRulx xdef
991 gsave
992 % set the screen frequency if it isn't zero
993 GRfreq 0 ne
994 {currentscreen
995 3 -1 roll pop GRfreq 3 1 roll
996 setscreen}
997 if
998 % set the gray level
999 GRgraylev setgray
1000 % draw and fill the path
1001 GRulx GRuly moveto
1002 GRlrx GRuly lineto
1003 GRlrx GRlry lineto
1004 GRulx GRlry lineto
1005 closepath
1006 fill
1007 grestore
1008 } bdef
1009
1010
1011 %
1012 % Procedures for implementing the "paper <source>" option:
1013 % <name> <eop> SPS -
1014 % <eop> paper-manual -
1015 % etc. The boolean <eop> is passed so that a paper source procedure
1016 % knows if it is being called at the beginning (false) or end
1017 % (true) of a page.
1018
1019 /SPS {
1020 /eop xdef
1021 /name xdef
1022 name where {pop eop name cvx exec} if
1023 } bdef
1024
1025 /paper-manual {
1026 {statusdict /manualfeed known
1027 {statusdict /manualfeed true put}
1028 if}
1029 if
1030 } bdef
1031
1032 /paper-automatic {
1033 {statusdict /manualfeed known
1034 {statusdict /manualfeed false put}
1035 if}
1036 if
1037 } bdef
1038
1039 /paper-top-tray {
1040 {}
1041 {statusdict /setpapertray known
1042 {statusdict begin gsave 0 setpapertray grestore end}
1043 if}
1044 ifelse
1045 } bdef
1046
1047 /paper-bottom-tray {
1048 {}
1049 {statusdict /setpapertray known
1050 {statusdict begin gsave 1 setpapertray grestore end}
1051 if}
1052 ifelse
1053 } bdef
1054
1055 /paper-both-trays {
1056 {}
1057 {statusdict /setpapertray known
1058 {statusdict begin gsave 2 setpapertray grestore end}
1059 if}
1060 ifelse
1061 } bdef
1062
1063 (end of common prolog) VMSDebug
1064
1065 end
1066
1067 systemdict /setpacking known
1068 {savepackingmode setpacking}
1069 if
1070
1071 %
1072 % End of included prolog section.
1073 %
1074
1075 %%EndProlog
1076 %%BeginSetup
1077 BeginDviLaserDoc
1078 300 300 RES
1079 %%EndSetup
1080
1081
1082 %%Page: 1 1
1083 %%PageBoundingBox: (atend)
1084 %%BeginPageSetup
1085 1000 BP 3300 2550 PM /paper-automatic false SPS 383 0 XY
1086 %%EndPageSetup
1087 XP /F0 /cmr10 300 41.5 41.5 128 [-3 -11 41 31] PXLNF RP
1088 XP /F0 65 31 1 0 29 29 29 32 0
1089 <00060000 00060000 00060000 000F0000 000F0000 000F0000 00178000
1090 00178000 00178000 0023C000 0023C000 0023C000 0041E000 0041E000
1091 0041E000 0080F000 0080F000 0180F800 01007800 01FFF800 03007C00
1092 02003C00 02003C00 06003E00 04001E00 04001E00 0C001F00 1E001F00
1093 FF80FFF0>
1094 PXLC RP
1095 383 342 XY F0(AAAAAA)S
1096 XP /F0 49 21 4 0 17 28 28 16 0
1097 <0300 0700 3F00 C700 0700 0700 0700 0700 0700 0700 0700 0700 0700
1098 0700 0700 0700 0700 0700 0700 0700 0700 0700 0700 0700 0700 0700
1099 0F80 FFF8>
1100 PXLC RP
1101 1265 3070 XY F0(1)S
1102 %%PageTrailer
1103 PF /paper-automatic true SPS 1 PP EP
1104 %%PageBoundingBox: 92 53 308 717
1105
1106 %%Trailer
1107 EndDviLaserDoc
1108
1109 %%BoundingBox: 92 53 308 717
1110 %%Pages: 1
1111 %%DocumentFonts: