$mid = ($lims[1] - $lims[0]) * 0.5;
}
+sub pos_plus_dy_adjunct ($) {
+ my ($cval) = @_;
+ my ($x,$y,$whadjunct) = @$cval;
+ my $adjunct = $adjuncts_dy_from_boundings{ $whadjunct };
+ return "$x $y ".( defined $adjunct and "$adjunct add translate" );
+}
+
sub adjust_sea() {
# Adjusts the top and bottom edges of the sea
my $poly = $region{$c{Sea}}{Polygon};
foreach my $deck (@{ $c{Decks} }) {
o(" $lw setlinewidth ",miscpscolour($deck->{Colour}),"\n");
- o(" gsave @{ $deck->{Pos} } ");
- my $adjunct = $adjuncts_dy_from_boundings{ $deck->{dyAdjunct} };
- if (defined $adjunct) { o("$adjunct add translate"); }
- o(" ");
+ o(" gsave ".pos_plus_dy_adjunct($deck->{PosAdy})." ");
my $rotate = $deck->{Rotate};
if ($rotate) { o(" $rotate rotate "); }
o("deckpairpathx stroke grestore");
{ Re => qr{Noorderzijlvest}, PA => [ 100,-50 ] },
],
Decks => [
- { Colour => 'playerdeck', Pos => [ 401, 44 ], dyAdjunct => 'Bottom' },
- { Colour => 'dykefail', Pos => [ 242, 1363 ], dyAdjunct => 'Top',
- Rotate => 90 },
+ { Colour => 'playerdeck', PosAdy => [ 401, 44, 'Bottom' ] },
+ { Colour => 'dykefail', PosAdy => [ 242, 1363, 'Top'], Rotate => 90 },
],
);