chiark / gitweb /
some fill
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 28 Feb 2019 20:42:39 +0000 (20:42 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 28 Feb 2019 20:42:39 +0000 (20:42 +0000)
generate-board
misc-data.pl

index 4fea68041d45f2dded3284e828d34c80129f7d3e..14b264c7a3ad5ae96628610aee778d14d217274f 100755 (executable)
@@ -228,7 +228,14 @@ sub write_face_edges() {
       o(sprintf "    %20.6f %20.6f %s\n", $pos->get(0),$pos->get(1), $xto);
       $xto = 'lineto';
     }
-    o("    closepath stroke\n");
+    o("    closepath\n");
+    my $chex = $c{Colours}{$rr->{Colour}};
+    if ($chex) {
+      o("    gsave ");
+      o(sprintf " %.6f ", hex($_) / 15.0) foreach split //, $chex;
+      o(" setrgbcolor eofill grestore\n");
+    }
+    o("    stroke\n");
   }
 }
 
@@ -245,7 +252,7 @@ o("%!\n");
 # xxx boundingbox
 write_face_edges();
 
-#print STDERR Dumper(\%region);
+print STDERR Dumper(\%region);
 
 # Local variables:
 # cperl-indent-level: 2
index 212dd8cc466bc77f81f1d9448b2d827a233f03d4..09c467cbcdc61907e7d779c0ba90a8e24860d42f 100644 (file)
@@ -3,4 +3,11 @@ our %c =
  OrientRegions => [ 'Roer en Overmaas', 'Noorderzijlvest' ],
  OrientBearing => -10,
  GraphScale => 25,
+ Colours => {
+     yellow => 'ff0',
+     purple => 'f0f',
+     green  => '0f0',
+     red    => 'f80',
+     high   => '888',
+ },
 );