*** webps.cgi	Mon Oct 25 15:16:43 2004
--- webps-new.cgi	Mon Oct 25 15:17:06 2004
***************
*** 116,121 ****
--- 116,132 ----
  %  Jon Buller's useful code ends here...
  %
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ 
+ %NOTE: convenience functions
+ %
+ %show centered text
+ %
+ /cshow {dup stringwidth pop 2 div neg 0 rmoveto show} def
+ %
+ %show right-aligned text
+ %
+ /rshow {dup stringwidth pop neg 0 rmoveto show} def
+ 
  %
  % Annotation begins...
  %
***************
*** 236,242 ****
                           $minCol + $cols - 1,
                           $minRow + $rows - 1);
     
!    print OUT "%!PS-Adobe-3.0\n",
               "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
               "%\n",
               "%  Adjust these to your requirements.\n",
--- 247,255 ----
                           $minCol + $cols - 1,
                           $minRow + $rows - 1);
     
!    # (NOTE: "%!PS-Adobe-3.0" implies structured PostScript that
!    # can be manipulated by a print spooler; this ain't)
!    print OUT "%!\n",
               "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
               "%\n",
               "%  Adjust these to your requirements.\n",
***************
*** 391,397 ****
     #
     #  Parsec location
     #
!    $out = "$x top $y sub moveto  ($loc) show\n";
     #
     #
     #####################################################################
--- 404,411 ----
     #
     #  Parsec location
     #
! #NOTE: now centered
!    $out = "$x 0.27 add top $y sub moveto  ($loc) cshow\n";
     #
     #
     #####################################################################
***************
*** 613,621 ****
     #  Due to current print quality, sector maps do not have hex
     #  data on them.  Subsector maps will; even regional maps will.
     #
!    $tx  = ($c-0.7) * 1.3 + 0.7;
     $ty  = $y + 0.45;
!    $out .= "$tx top $ty sub moveto ($world{UWP}) show\n"
         if $option{ 'show uwp' };
        #if  $cols < 21 
        #&&  $rows < 17;
--- 627,636 ----
     #  Due to current print quality, sector maps do not have hex
     #  data on them.  Subsector maps will; even regional maps will.
     #
!    $tx  = $c * 1.3 + 0.27;
     $ty  = $y + 0.45;
! #NOTE: now centered in hex
!    $out .= "$tx top $ty sub moveto ($world{UWP}) cshow\n"
         if $option{ 'show uwp' };
        #if  $cols < 21 
        #&&  $rows < 17;
***************
*** 627,640 ****
     #
     #  World Name
     #
!    $tx = ($c-0.7) * 1.3 + 0.7;
     $ty = $y + 0.65;
     
     $out .= "$red setrgbcolor\n" if $world{ codes } =~ /Cp|Cx/
                                  && $option{ 'show codes' };
                                  
     
!    $out .= "$tx top $ty sub moveto  (".$world{ name }.") show\n";
     
     $out .= "$black setrgbcolor\n" if $world{ codes } =~ /Cp|Cx/
                                    && $option{ 'show codes' };
--- 642,658 ----
     #
     #  World Name
     #
!    $tx = $c * 1.3 + 0.27;
     $ty = $y + 0.65;
     
     $out .= "$red setrgbcolor\n" if $world{ codes } =~ /Cp|Cx/
                                  && $option{ 'show codes' };
                                  
     
!    $world{name} =~ s/\s*$//;
! #   NOTE: now centered in hex
!    $out .= "$tx top $ty sub moveto ($world{name}) cshow\n"
!       if length($world{name}) > 0;
     
     $out .= "$black setrgbcolor\n" if $world{ codes } =~ /Cp|Cx/
                                    && $option{ 'show codes' };