o(" closepath\n");
}
-sub write_face_edges() {
- o("5 setlinewidth 1 setlinejoin\n");
+sub fill_faces() {
foreach my $rr (values %region) {
next if $rr->{Name} eq 'L';
face_path($rr);
- # xxx ordering: must do all fills then all strokes
my $chex = $c{Colours}{$rr->{Colour}};
- if ($chex) {
- o(" gsave ");
- o(sprintf " %.6f ", hex($_) / 15.0) foreach split //, $chex;
- o(" setrgbcolor eofill grestore\n");
- }
- if ($rr->{Name} ne 'NZ') {
- o(" stroke\n");
- }
+ next unless $chex;
+ o(sprintf " %.6f ", hex($_) / 15.0) foreach split //, $chex;
+ o(" setrgbcolor eofill\n");
+ }
+}
+
+sub edge_faces() {
+ o("5 setlinewidth 1 setlinejoin 0 setgray\n");
+ foreach my $rr (values %region) {
+ next if $rr->{Name} eq 'L';
+ face_path($rr);
+ o(" stroke\n");
}
}
o("%!\n");
o(" 0.52 dup scale\n"); # xxx bodge
# xxx boundingbox
-write_face_edges();
+fill_faces();
+edge_faces();
print STDERR Dumper(\%region) if $ENV{'GENERATE_BOARD_DUP'};