const char* defs_ps[] = {
"",
"",
"B_test 1 eq { newpath",
"   gsave 3 setlinewidth",
"      0 setgray",
"      BBLL aload pop moveto",
"      BBLL aload pop BBUR aload pop pop exch lineto   % this is LR",
"      BBUR aload pop lineto",
"      BBUR aload pop BBLL aload pop pop exch lineto   % this is UL",
"      closepath stroke",
"   grestore",
"} if",
"",
"",
"/circledict 1 dict def",
"",
"/snap { transform round exch round exch itransform } bind def",
"",
"/mysetrgb {",
"   color_xcn length 3 eq {",
"      pop pop pop",
"      color_xcn aload pop",
"   } if",
"   setrgbcolor",
"} def",
"",
"                        %%    [ x y ] fac",
"/proc_circle {",
"   dup 1 gt { pop 1 } if",
"   dup 0 lt { pop 0 } if",
"   gsave                %%    newpath moveto",
"   circledict begin",
"      /fac exch def",
"      0 1 2 {",
"         dup color_max exch get exch color_min exch get",
"                        %%    max min on stack",
"         dup 3 1 roll   %%    min max min",
"         -1 mul add",
"         fac mul add",
"      } for",
"      % 3 -1 roll",
"      mysetrgb",
"      aload pop snap moveto",
"      currentpoint",
"      gsave",
"         currentpoint radius 0 360 arc",
"         fill",
"         boundwidth 0 gt",
"         {  gsave boundwidth setlinewidth",
"            0 setgray",
"            radius 0 360 arc",
"            stroke",
"            grestore",
"         }  if",
"      grestore",
"   end",
"   grestore",
"} def",
"",
"",
"                        %%    [ x y ] r g b level",
"/proc_circle_colour {",
"   gsave                %%    newpath moveto",
"   circledict begin",
"   /level exch def",
"      aload pop mysetrgb",
"      gsave",
"         dup dup",
"         newpath",
"         aload pop radius level mul 0 360 arc",
"         aload pop radius level -1 add mul 360 0 arcn",
"         fill",
"         newpath",
"         aload pop radius level mul 0 360 arc",
"         boundwidth 0 gt",
"         {  gsave boundwidth setlinewidth",
"            radius 0 360 arc",
"            stroke",
"            grestore",
"         }  if",
"      grestore",
"   end",
"   grestore",
"} def",
"",
"",
"         %",
"         %  stack: [ Ax Ay ] [ Bx By] wAB wBA",
"         %",
"",
"/biarcdict 11 dict def",
"",
"/proc_2edge {",
"   gsave",
"      biarcdict begin",
"         arcwidth setlinewidth",
"",
"         /wBA exch def",
"         /wAB exch def",
"",
"         aload pop",
"            /By exch def",
"            /Bx exch def",
"         aload pop",
"            /Ay exch def",
"            /Ax exch def",
"   ",
"         /dx Ax Bx -1 mul add def",
"         /dy Ay By -1 mul add def",
"         /L  dx dx mul dy dy mul add sqrt def",
"         ",
"         /ddx dy L div displacement mul def",
"         /ddy dx L div displacement mul def",
"         ",
"         wAB 0.002 gt {",
"            Ax ddx add Ay ddy -1 mul add snap moveto",
"            Bx ddx add By ddy -1 mul add snap lineto",
"            1 1 wAB sqrt sqrt -1 mul add dup mysetrgb",
"            stroke",
"         }",
"         if",
"   ",
"         wBA 0.002 gt {",
"            Bx ddx -1 mul add By ddy add snap moveto",
"            Ax ddx -1 mul add Ay ddy add snap lineto",
"            1 1 wBA sqrt sqrt -1 mul add dup mysetrgb",
"            stroke ",
"         } if",
"",
"      end",
"   grestore",
"}  def",
"",
"",
"/proc_3edge {",
"   2 copy lt { exch } if pop",
"   gsave",
"      sqrt sqrt -1 mul 1 add setgray",
"      edgewidth setlinewidth",
"      aload pop snap moveto",
"      aload pop snap lineto",
"      stroke",
"   grestore",
"} def",
"",
"",
"/proc_edge {",
"   pop pop",
"   edgecolor aload pop mysetrgb",
"   edgewidth setlinewidth",
"   aload pop snap moveto",
"   aload pop snap lineto",
"   stroke",
"} def",
"",
"",
"",
NULL
}  ;
