chiark / gitweb /
places output
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 2 Jul 2022 14:24:58 +0000 (15:24 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 2 Jul 2022 14:24:58 +0000 (15:24 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
overflow-tube.ps.pl

index 1e86ef166a34ab71b188c7fc7f570020a2700612..410257821de6b7d6583260b309921dd8eee3c688 100755 (executable)
@@ -73,7 +73,8 @@ sub places ($) {
         1 -1   37 16
         1  0
 END
-  my @line_poses;
+  my $line;
+  my $line_word = 'moveto';
 
   my $o = '';
 
@@ -93,7 +94,8 @@ END
     $x *= $colspacing;
     $y *= $spacing;
 
-    push @line_poses, "$x $y";
+    $line .= " $x $y $line_word";
+    $line_word = 'lineto';
     next unless defined $money;
 
     $money += 4 * $repi;
@@ -113,7 +115,7 @@ END
     grestore
 END
 
-  $ps_framing .= $o;
+  ("newpath $line stroke", $o)
 }
 
 sub repis () {
@@ -123,7 +125,7 @@ gsave
   $repi $colspacing 2 mul mul  0 translate
 END
 
-    places($repi);
+    o( (places($repi))[1] );
     o(<<END);
 grestore
 END