|
|
@ -42,6 +42,17 @@ sub make_subregion($this, $name, %defaults) |
|
|
|
$this->add_subregion(HexGrid::Region->new(name => $name, defaults => $tile_defaults)); |
|
|
|
$this->add_subregion(HexGrid::Region->new(name => $name, defaults => $tile_defaults)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sub iter_tile($this, $code) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
foreach my $nw (keys %{$this->{tiles}}) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
foreach my $sw (keys %{$this->{tiles}{$nw}}) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$code->($this->{tiles}{$nw}{$sw}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
sub render($this, $svg, $laters, $grid) |
|
|
|
sub render($this, $svg, $laters, $grid) |
|
|
|
{ |
|
|
|
{ |
|
|
|
my ($min_x,$min_y,$max_x,$max_y) = qw(Inf Inf -Inf -Inf); |
|
|
|
my ($min_x,$min_y,$max_x,$max_y) = qw(Inf Inf -Inf -Inf); |
|
|
|