Cleaner clone() implementation

This commit is contained in:
Alessandro Ranellucci 2013-07-14 13:11:01 +02:00
parent 399bc80899
commit 0099218f61
3 changed files with 4 additions and 6 deletions

View file

@ -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);

View file

@ -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);