/* File generated by text2c filter from file header.ps on Tue Feb 28 11:17:36 EET 1995 */ #include char *psheader[] = { "%\n", "% PS header for umat - SOM to PS converter\n", "% Version 1.0 Tue Feb 28 1995\n", "% Author: Jussi Hynninen \n", "100 dict begin\n", "\n", "% predefine variables\n", "/yoff 0 def /xoff 0 def /xstep 0 def /ystep 0 def /y 0 def /radius 0 def\n", "/doborder false def\n", "% default font\n", "/fontname /Helvetica def\n", "% font size relative to radius\n", "/fontsize 1.0 def\n", "\n", "% default black and white tresholds\n", "/bt 0.0 def /wt 1.0 def\n", "\n", "% labelpallon sade suhteessa hexan sateeseen\n", "/ballrad 0.2 def\n", "\n", "% newline function. Moves the y coordinate to the next line\n", "/NL \n", "{ /yoff yoff ystep sub def % next row\n", " /y y 1 add def % add y by one\n", " } bind def\n", "\n", "% start of line (for hexagonal lattice) - moves the current position in \n", "% x direction to the correct place of the line\n", "/XSH\n", "{ xoff \n", " y 4 mod\n", " dup 3 eq {pop 1} if\n", " xstep 2 div mul\n", " add\n", " yoff moveto % move to start of line\n", "} bind def\n", "\n", "% start of line (for rectangular lattice) - moves the current position in \n", "% x direction to the correct place of the line\n", "/XSR { xoff yoff moveto } bind def\n", "\n", "% set label color. If block is light -> label is black and same for dark block\n", "/sbc { .5 gt {0} {1} ifelse setgray } bind def\n", "\n", "% set gray level\n", "/G { \n", " 100 div dup bt le {pop 0}\n", " { dup wt ge {pop 1} {bt sub wt bt sub div} ifelse\n", " } ifelse\n", "} bind def\n", "\n", "% unlabelled node\n", "/LN { \n", " gsave\n", " G sbc\n", " currentpoint radius ballrad mul 0 360 arc fill \n", " grestore\n", " xstep 2 mul 0 rmoveto\n", "} bind def\n", "\n", "%select font\n", "/selfont {\n", " fontname findfont radius fontsize mul scalefont setfont\n", "} bind def\n", "\n", "% print single label\n", "\n", "/LAB { \n", " gsave\n", " G sbc\n", " dup %duplicate string \n", " stringwidth\n", " pop fontsize radius mul -0.25 mul exch\n", " -2 div exch\n", " rmoveto\n", " show\n", " grestore\n", " xstep 2 mul 0 rmoveto\n", "} bind def\n", "\n", "% print multiple labels on one unit\n", "/ML {\n", " gsave\n", " G sbc\n", " /numlabs exch def %number of labels\n", " numlabs\n", " 2 div \n", " 0.25 sub\n", " radius fontsize mul mul neg\n", " 0 exch rmoveto\n", " 1 1 numlabs {\n", " pop\n", " gsave\n", " dup %duplicate string \n", " stringwidth\n", " pop \n", " -2 div 0\n", " rmoveto\n", " show\n", " grestore\n", " 0 fontsize radius mul rmoveto\n", " } for \n", " grestore\n", " xstep 2 mul 0 rmoveto\n", "} bind def\n", "\n", "% print hexagon\n", "/H { \n", " gsave\n", " G dup setgray %duplicate gray level\n", " currentpoint translate\n", " newpath 0 radius moveto\n", " 5 {60 rotate 0 radius lineto} repeat\n", " closepath\n", " doborder { gsave fill grestore sbc stroke}\n", " { fill pop } ifelse\n", " grestore \n", " xstep 0 rmoveto\n", "} bind def\n", "\n", "% print rectangle\n", "/R {\n", " gsave\n", " G dup setgray %duplicate gray level\n", " currentpoint translate\n", " newpath\n", " xstep 0.5 mul dup moveto\n", " xstep neg 0 rlineto\n", " 0 xstep neg rlineto\n", " xstep 0 rlineto\n", " closepath\n", " doborder { gsave fill grestore sbc stroke}\n", " { fill pop } ifelse\n", " grestore \n", " xstep 0 rmoveto\n", "} bind def\n", "\n", "1 setlinewidth\n", "\n", "% End of umat PS header\n", "% Start image\n", "\n", "\n", NULL};