Bugfix: some islands having ho holes and contained in holes themselves were ignored

This commit is contained in:
Alessandro Ranellucci 2011-12-24 11:01:28 +01:00
parent 47df3f8f2d
commit a86bc260e7
4 changed files with 47 additions and 12 deletions

View file

@ -140,4 +140,11 @@ sub rotate {
$_->rotate(@_) for @$self;
}
sub area {
my $self = shift;
my $area = $self->contour->area;
$area -= $_->area for $self->holes;
return $area;
}
1;