chiark / gitweb /
deckpairpathx nfc
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 3 Mar 2019 00:32:45 +0000 (00:32 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 3 Mar 2019 00:35:28 +0000 (00:35 +0000)
generate-board

index a92657dcf819c640c291841173abf55007a555a2..6cc633432b8cd161322d27794c8b741736b0525a 100755 (executable)
@@ -508,11 +508,11 @@ sub water_cubes($){
 }
 
 sub decks(){
-  o("  /deckpath {\n");
+  o("  /deck1path {\n");
   my $w = 63 * MM2PT;
   my $h = 89 * MM2PT;
   my $r =  5 * MM2PT;
-  o("    newpath  ",($w/2)," 0 moveto\n");
+  o("      ",($w/2)," 0 moveto\n");
   my @p = ([ $w, 0 ],
           [ $w,$h ],
           [ 0, $h ],
@@ -522,14 +522,12 @@ sub decks(){
   }
   o("    closepath\n");
   o("  } bind def");
-  o("  gsave 407 50 translate");
-  o("                   deckpath stroke\n");
-  o("   200 0 translate deckpath stroke\n");
-  o("  grestore");
-  o("  gsave 225 1375 translate 90 rotate");
-  o("                   deckpath stroke\n");
-  o("   200 0 translate deckpath stroke\n");
-  o("  grestore");
+  o("  /deckpairpathx {\n"); # x because it leaves matrix changed
+  o("    newpath         deck1path\n");
+  o("    200 0 translate deck1path\n");
+  o("  } bind def");
+  o("  gsave 407 50 translate deckpairpathx stroke grestore");
+  o("  gsave 225 1375 translate 90 rotate deckpairpathx stroke grestore");
 }
 
 sub sea_track(){