Better polymorphism for ExPolygon::XS->rotate

This commit is contained in:
Alessandro Ranellucci 2013-07-14 16:03:06 +02:00
parent 28a4f1a61e
commit 06de21b154
6 changed files with 32 additions and 21 deletions

View file

@ -15,15 +15,6 @@ package Slic3r::ExPolygon::XS;
use overload
'@{}' => sub { $_[0]->arrayref };
# to handle legacy code
sub rotate {
my $self = shift;
my ($angle, $center) = @_;
$center = Slic3r::Point::XS->new(@$center) if ref($center) ne 'Slic3r::Point::XS';
$self->_rotate($angle, $center);
}
package Slic3r::ExPolygon::Collection;
use overload
'@{}' => sub { $_[0]->arrayref };