Cleaner clone() implementation
This commit is contained in:
parent
399bc80899
commit
0099218f61
@ -15,8 +15,6 @@ package Slic3r::ExPolygon::XS;
|
||||
use overload
|
||||
'@{}' => sub { $_[0]->arrayref };
|
||||
|
||||
sub clone { (ref $_[0])->_clone($_[0]) }
|
||||
|
||||
# to handle legacy code
|
||||
sub rotate {
|
||||
my $self = shift;
|
||||
@ -30,8 +28,6 @@ package Slic3r::ExPolygon::Collection;
|
||||
use overload
|
||||
'@{}' => sub { $_[0]->arrayref };
|
||||
|
||||
sub clone { (ref $_[0])->_clone($_[0]) }
|
||||
|
||||
package Slic3r::Surface;
|
||||
|
||||
sub new {
|
||||
|
@ -6,8 +6,9 @@
|
||||
%}
|
||||
|
||||
%name{Slic3r::ExPolygon::XS} class ExPolygon {
|
||||
%name{_clone} ExPolygon(ExPolygon& self);
|
||||
~ExPolygon();
|
||||
ExPolygon* clone()
|
||||
%code{% const char* CLASS = "Slic3r::ExPolygon::XS"; RETVAL = new ExPolygon(*THIS); %};
|
||||
SV* arrayref()
|
||||
%code{% RETVAL = expolygon2perl(*THIS); %};
|
||||
void scale(double factor);
|
||||
|
@ -6,8 +6,9 @@
|
||||
%}
|
||||
|
||||
%name{Slic3r::ExPolygon::Collection} class ExPolygonCollection {
|
||||
%name{_clone} ExPolygonCollection(ExPolygonCollection& self);
|
||||
~ExPolygonCollection();
|
||||
ExPolygonCollection* clone()
|
||||
%code{% const char* CLASS = "Slic3r::ExPolygon::Collection"; RETVAL = new ExPolygonCollection(*THIS); %};
|
||||
void scale(double factor);
|
||||
void translate(double x, double y);
|
||||
void rotate(double angle, Point* center);
|
||||
|
Loading…
Reference in New Issue
Block a user