our $max_printeredge = 5.50 * MM2PT;
our $a1m_pasteedge = 3.5 * MM2PT; # along each edge
our $preamble_from_boundings = '';
-our $top_adjuncts_dy_from_boundings = 0;
-our $bottom_adjuncts_dy_from_boundings = 0;
+our %adjuncts_dy_from_boundings = (Top => 0, Bottom => 0);
# ----- region names from plag, incl. reverse mapping -----
-$surroundw 0 rlineto
closepath $w_stroke clip
END
- ($top_adjuncts_dy_from_boundings,
- $bottom_adjuncts_dy_from_boundings) = @{ $c{PA}{BoundingsA1dy} };
+ $adjuncts_dy_from_boundings{Top} = $c{PA}{BoundingsA1dy}[0];
+ $adjuncts_dy_from_boundings{Bottom} = $c{PA}{BoundingsA1dy}[1];
# ^ if we are doing it all in one go we lose less printable area
} else {
confess;
}
o(" closepath\n");
o(" } bind def");
+
o(" /deckpairpathx {\n"); # x because it leaves matrix changed
o(" newpath deck1path\n");
o(" 200 0 translate deck1path\n");
o(" } bind def");
- o(" $lw setlinewidth ",miscpscolour('playerdeck'),"\n");
- o(" gsave 401 44 $bottom_adjuncts_dy_from_boundings add translate");
- o(" deckpairpathx stroke grestore");
- o(" $lw setlinewidth ",miscpscolour('dykefail'),"\n");
- o(" gsave 242 1363 $top_adjuncts_dy_from_boundings add translate ");
- o(" 90 rotate deckpairpathx stroke grestore");
+
+ 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(" ");
+ my $rotate = $deck->{Rotate};
+ if ($rotate) { o(" $rotate rotate "); }
+ o("deckpairpathx stroke grestore");
+ }
}
sub sea_track(){
my $demo_w = $demo_x0 + $dyke_l * 0.60;
o(" % HS I $colour\n");
o(" gsave\n");
- o(" 550 1705 $top_adjuncts_dy_from_boundings add translate\n");
+ o(" 550 1705 $adjuncts_dy_from_boundings{Top} add translate\n");
o(" ", ($xi*$interval), " ", (($yi-1)*$interval), " translate\n");
if ($fn) {
o(" gsave\n");
sub play_hint () {
my $sz = 20;
o(" gsave ",miscpscolour('hinttext'),
- " 260 1715 $top_adjuncts_dy_from_boundings add translate\n");
+ " 260 1715 $adjuncts_dy_from_boundings{$c{PlayHintdyAdjunct}} add translate\n");
o(" /Helvetica-Bold findfont $sz scalefont setfont\n");
my @t = split /\n/, $c{PlayHint};
foreach my $i (0..$#t) {
Overall => [ 34, -15 ],
OverallOn => { a4 => [ 0, -17 ] },
},
+ PlayHintdyAdjunct => 'Top',
PA_HS_HS => { green => [0, -0.40] },
PA_Outercoast_Vertices => [
{ Re => qr{Noorderzijlvest}, PA => [ 100,-50 ] },
],
+ Decks => [
+ { Colour => 'playerdeck', Pos => [ 401, 44 ], dyAdjunct => 'Bottom' },
+ { Colour => 'dykefail', Pos => [ 242, 1363 ], dyAdjunct => 'Top',
+ Rotate => 90 },
+ ],
);