chiark / gitweb /
overflow-tube: Add cover up instruction (introduce var)
[quacks.git] / overflow-tube.ps.pl
index ac62cb1b60ca3debaf27afc4a8b48b795764bbac..bdbe3663d178db0714b6055dd2364a66cbab8e2a 100755 (executable)
@@ -19,8 +19,15 @@ ps_start(<<END);
 END
 
 my $x_cut = 27;
+my $x_cut2 = 38;
+my $y_cut2 = 24;
 my $y_cutd = 10;
 
+my $coverup_x = 4;
+my $coverup_y = 89;
+
+my $y_cut2d = $y_cutd * ($x_cut2-$x_cut)/$x_cut;
+
 my $nrepis = 4;
 
 my $paper_x = 210;
@@ -36,10 +43,12 @@ my $y_pl_zero = $y_cut + $spacing - $y_cutd* 0.5 * $x_cut/$colspacing;
 
 my $y_top = $y_pl_zero + $y_cutd + $spacing*1.25;
 
+our $veep_bg = " 0.95 0.90 0.67 setrgbcolor ";
+
 sub some_cut_line($) {
   <<END;
 gsave
-  0.5 setgray
+  0.25 setlinewidth
   $_[0]
 grestore
 END
@@ -49,12 +58,14 @@ END
 o <<GS, some_cut_line(<<GR), <<END;
 /cut_line {
 GS
-                              newpath
-  $x_cut 0                    moveto
-  $x_cut $y_cut               lineto
-  0      $y_cut $y_cutd add   lineto
-  0      $y_top               lineto
-                              stroke
+                                          newpath
+  $x_cut2     0                           moveto
+  $x_cut2     $y_cut2                     lineto
+  $x_cut      $y_cut2   $y_cut2d add      lineto
+  $x_cut      $y_cut                      lineto
+  0           $y_cut    $y_cutd add       lineto
+  0           $y_top                      lineto
+                                          stroke
 GR
 } def
 END
@@ -82,7 +93,11 @@ sub veepsq ($) {
                $sqx  $sqy lineto
                $sqx -$sqy lineto closepath
 
-       gsave 1 setgray fill grestore
+       gsave 
+             $veep_bg
+             fill
+       grestore
+       0.19 0.35 0.25 setrgbcolor
        0.5 setlinewidth
        stroke
     grestore
@@ -146,7 +161,7 @@ gsave
     newpath
     0 0 chip 0.5 mul 0 360 arc
     gsave 0.5 setlinewidth $black stroke grestore
-    0.37 0.70 0.50 setrgbcolor fill
+    0.80 0.89 0.63 setrgbcolor fill
   grestore
 
   -4.7 1 moveto ($money) show
@@ -170,7 +185,15 @@ END
     grestore
 END
 
-  (" newpath $line stroke ", $o)
+  $line = <<END;
+  newpath
+    0.66 0.85 0.75 setrgbcolor
+    4 setlinewidth
+  $line
+  stroke
+END
+
+  ($line, $o)
 }
 
 sub repis () {
@@ -208,6 +231,17 @@ END
   repis();
 
   o <<END;
+    gsave
+      $coverup_x $coverup_y translate
+      /Times-Roman findfont 4.0 scalefont setfont
+      0 8 moveto  (cover) show
+      2 4.5 moveto  (up) show
+      0 0 moveto
+      /Helvetica-Bold-Italic findfont 3.5 scalefont setfont (35) show
+      1 0 rmoveto
+      /Helvetica-Bold findfont 3.5 scalefont setfont (15) show
+    grestore
+
     gsave
       $paper_x $x_cut sub  $y_top 7 sub translate