chiark / gitweb /
wip yellow
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 26 Oct 2021 01:18:21 +0000 (02:18 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 26 Oct 2021 01:18:25 +0000 (02:18 +0100)
pumpkin-books.ps.pl

index 887425fe210c0dc68fc9a6b1cf1976fdaa2f3125..024a59c0104c88a7044637a1ee76c4e0328cd971 100755 (executable)
@@ -477,7 +477,49 @@ END
 sub yellow_book () {
   my $o = general_book($yellow, [qw(7 12 19)]);
 
-  $o .= <<END;
+  my $exchip = sub {
+    my ($that, $pips) = @_;
+    <<END;
+  gsave ${\ chip($that, $pips) } grestore
+END
+  };
+  my $exslash = sub {
+    <<END;
+    8 -5 moveto (/) show
+    20 0 translate
+END
+  };
+  
+  my $exchline = sub {
+    my ($y, $pips, $content) = @_;
+    <<END;
+gsave 
+  0.16 0.15 0.16 $y mul add dc translate
+  0.60 dup scale
+  gsave ${\ chip($yellow,$pips) } grestore
+  8 -3 moveto (:) show
+  3 0 translate
+  0.8 dup scale
+  21 0 translate
+$content
+grestore
+END
+  };
+
+  $o .= $exchline->(2, 1, <<END);
+  ${\ $exchip->($white,1) }  ${\ $exslash->() }
+  ${\ $exchip->($anychip,1) }  ${\ $exslash->() }
+  ${\ $exchip->($lotus,0) }
+END
+
+  $o .= $exchline->(1, 2, <<END);
+  ${\ $exchip->($white,2) }  ${\ $exslash->() }
+  ${\ $exchip->($anychip,2) }
+END
+
+  $o .= $exchline->(0, 4, <<END);
+  ${\ $exchip->($white,3) }  ${\ $exslash->() }
+  ${\ $exchip->($anychip,4) }
 END
 
   $o .= exposition(<<END);
@@ -535,11 +577,7 @@ $page_pre
 
 END
 
-print tile(
-          yellow_book(),
-         ) or die $! if 1;
-
-print "showpage\n" or die $!;
+print "gsave\n" or die $!;
 
 print tile(
           red_book(),
@@ -547,4 +585,5 @@ print tile(
           purple_book(),
           blue_book(),
           lotus_book(),
+          yellow_book(),
          ) or die $! if 1;