"%% Common postScript header.\n"
"\n"
"/boxHere {\n"
"% Draw a box at current position.\n"
"% Usage width height boxAt\n"
"dup 0 exch   %stack width height 0 height\n"
"rlineto      %stack width height\n"
"exch dup 0   %stack height width width 0\n"
"rlineto      %stack height width\n"
"exch         %stack width height\n"
"0 exch       %stack width 0 height\n"
"neg          %stack width 0 -height\n"
"rlineto      %stack width\n"
"neg 0        %stack -width 0\n"
"rlineto\n"
"} def\n"
"\n"
"/boxAt {\n"
"% Draw a box at a position.  Usage:\n"
"% width height x y boxAt\n"
"moveto\n"
"boxHere\n"
"} def\n"
"\n"
"/fillBox {\n"
"% Draw filled box at a position. Usage:\n"
"% width height x y fillBox\n"
"newpath\n"
"boxAt\n"
"fill\n"
"} def\n"
"\n"
"/strokeBox {\n"
"% Draw stroked box at a position. Usage:\n"
"% width height x y strokeBox\n"
"newpath\n"
"boxAt\n"
"stroke\n"
"} def\n"
"\n"
"/smallFont {\n"
"/Times-Roman findfont\n"
"10 scalefont\n"
"setfont\n"
"} def\n"
"\n"
"/showBefore {\n"
"% Draw text immediately before rather\n"
"% than immediately after current position.\n"
"% Usage (some text) showBefore\n"
"dup\n"
"stringwidth\n"
"neg\n"
"exch\n"
"neg\n"
"exch\n"
"rmoveto\n"
"show\n"
"} def\n"
"\n"
"/showMiddle {\n"
"% Draw text centered at current position.\n"
"% Usage (some text) showMiddle\n"
"dup stringwidth\n"
"2 div neg\n"
"exch\n"
"2 div neg\n"
"exch\n"
"rmoveto\n"
"show\n"
"} def\n"
"\n"
"/ellipse {\n"
"/endangle exch def\n"
"/startangle exch def\n"
"/yrad exch def\n"
"/xrad exch def\n"
"/y exch def\n"
"/x exch def\n"
"/savematrix matrix currentmatrix def\n"
"x y translate\n"
"xrad yrad scale\n"
"0 0 1 startangle endangle arc\n"
"savematrix setmatrix\n"
"} def\n"
"/fillTextBox {\n"
"true charpath pathbbox\n"
"/y2 exch def /x2 exch def\n"
"/y1 exch def /x1 exch def\n"
"/w x2 x1 sub def\n"
"/h y2 y1 sub def\n"
"w h x1 y1 fillBox\n"
"} def\n"
"\n"
"smallFont\n"
"\n"
