sprintf "%20.6f %20.6f", $pos->get(0),$pos->get(1)
}
+sub face_path ($) {
+ my ($rr) = @_;
+ o("% $rr->{Name}\n");
+ o(" newpath\n");
+ my $xto = 'moveto';
+ foreach my $vertex (@{ $rr->{Polygon} }) {
+ my $pos = $vertex->{Pos};
+ o(sprintf " %s %s\n", psvec($pos), $xto);
+ $xto = 'lineto';
+ }
+ o(" closepath\n");
+}
+
sub write_face_edges() {
o("5 setlinewidth 1 setlinejoin\n");
foreach my $rr (values %region) {
next if $rr->{Name} eq 'L';
- o("% $rr->{Name}\n");
- o(" newpath\n");
- my $xto = 'moveto';
+ face_path($rr);
# xxx ordering: must do all fills then all strokes
- foreach my $vertex (@{ $rr->{Polygon} }) {
- my $pos = $vertex->{Pos};
- o(sprintf " %s %s\n", psvec($pos), $xto);
- $xto = 'lineto';
- }
- o(" closepath\n");
my $chex = $c{Colours}{$rr->{Colour}};
if ($chex) {
o(" gsave ");