home *** CD-ROM | disk | FTP | other *** search
- procedure posthd2;
- begin
- write(PrtFile,
- '%!PS-Adobe-2.0', CR, LF,
- '%%Creator: Thomas B. Passin', CR, LF,
- '%%Title: POSTOGRF graph', CR, LF,
- '%%BoundingBox: ');
-
- with Layout.BoundingBox do writeln(PrtFile,
- LLx, ' ', LLy, ' ', URx, ' ', URy);
-
- writeln(PrtFile,
- '%%Pages: 1', CR, LF,
- '%%EndComments', CR, LF,
- '% This printout is from ', ver, ', written by Thomas B. Passin.', CR, LF,
- '% POSTogrf operates on the output of J. R. VanZandt''s GRAPHLI or GRAPHPS ',
- CR, LF, '% program. The output file drives a Postscript printer.', CR, LF,
- '% ------------------------ Prologue -------------------------------', CR, LF,
- 'save', CR, LF,
- '%Abbreviations', CR, LF,
- '/cpt /currentpoint load def', CR, LF,
- '/l /lineto load def' ,CR, LF,
- '/m /moveto load def' ,CR, LF,
- '/sd /setdash load def' ,CR, LF,
- '/sf /setfont load def' ,CR, LF,
- '/sg /setgray load def' ,CR, LF,
- '/st /stroke load def' ,CR, LF,
- '/inch { 72 mul } def', CR, LF,
- '/linethick 10 def %default line thickness', CR, LF,
- '/barxl -1000 def', CR, LF,
- '/barxr 9500 def');
-
- writeln(PrtFile,
- '/bary ', {5100} Layout.origin.x - 1750, ' def');
-
- with Layout.origin do Writeln(PrtFile,
- '/setorigin { ', x/1000:6:3, ' inch ', y/1000:6:3, ' inch translate');
-
- if Layout.landscape then writeln(PrtFile,
- ' 90 rotate');
-
- writeln(PrtFile,
- ' 0 0 m } def');
-
- writeln(PrtFile,
- '/dobar { 28 setlinewidth barxl bary m', CR, LF,
- ' barxr bary l st } def', CR, LF,
- '/ss1 1 string def', CR, LF,
- '/x1 0 def /x2 0 def /y1 0 def /y2 0 def', CR, LF,
- '/charbox { % find largest char. height', CR, LF,
- ' { ss1 0 3 2 roll put ss1 false charpath', CR, LF,
- ' pathbbox cpt newpath m', CR, LF,
- ' dup y2 gt { /y2 exch def } { pop } ifelse', CR, LF,
- ' pop', CR, LF,
- ' dup y1 lt { /y1 exch def } { pop } ifelse', CR, LF,
- ' pop', CR, LF,
- ' } forall', CR, LF,
- ' } bind def', CR, LF,
- '/fillbox {', CR, LF,
- ' dup gsave', CR, LF,
- ' cpt newpath m', CR, LF,
- ' cpt /y1 exch def /x1 exch def', CR, LF,
- ' cpt /y2 exch def pop', CR, LF,
- ' charbox', CR, LF,
- ' /x2 cpt pop def', CR, LF,
- ' /dely y2 y1 sub 9 div def', CR, LF,
- ' /x1 x1 dely sub def', CR, LF,
- ' /x2 x2 dely add def', CR, LF,
- ' /y1 y1 dely sub def', CR, LF,
- ' /y2 y2 dely add def', CR, LF,
- ' x1 y1 moveto', CR, LF,
- ' x2 y1 lineto', CR, LF,
- ' x2 y2 lineto', CR, LF,
- ' x1 y2 lineto', CR, LF,
- ' closepath', CR, LF,
- ' 1 sg fill', CR, LF,
- ' grestore', CR, LF,
- ' } bind def', CR, LF,
- '/s { fillbox show } bind def', CR, LF,
- '/rs { 90 rotate s -90 rotate } bind def', CR, LF,
- '/rsho { 90 rotate show -90 rotate } bind def');
- end;
-
- procedure PSSetUp;
- begin
- writeln(PrtFile,
- '%%BeginSetup', CR, LF,
- 'gsave', CR, LF,
- 'statusdict dup', CR, LF,
- '/waittimeout 10 put', CR, LF,
- '/jobname (POSTOGRF) put', CR, LF,
- 'newpath', CR, LF,
- 'setorigin', CR, LF,
- '0.072 0.072 scale % set scale to 1/1000''s inch', CR, LF,
- 'linethick setlinewidth', CR, LF,
- '%%EndSetup');
- end;