Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2013-07-14 02:38:01 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-07-14 02:38:01 +0400
commitb1ad466189a93f5003528dcec7628c6fba794b8f (patch)
tree3a9b2d90c2eb9889121f000dc80b9b3a63111df5 /xs/xsp/ExPolygon.xsp
parent7f4dc4e248963e61cfc6c0072d7fdbfce42ce5d3 (diff)
Ported Slic3r::ExPolygon::Collection to XS
Diffstat (limited to 'xs/xsp/ExPolygon.xsp')
-rw-r--r--xs/xsp/ExPolygon.xsp16
1 files changed, 2 insertions, 14 deletions
diff --git a/xs/xsp/ExPolygon.xsp b/xs/xsp/ExPolygon.xsp
index 081b7ed25..fe7237008 100644
--- a/xs/xsp/ExPolygon.xsp
+++ b/xs/xsp/ExPolygon.xsp
@@ -8,6 +8,8 @@
%name{Slic3r::ExPolygon::XS} class ExPolygon {
%name{_clone} ExPolygon(ExPolygon& self);
~ExPolygon();
+ SV* arrayref()
+ %code{% RETVAL = expolygon2perl(*THIS); %};
void scale(double factor);
void translate(double x, double y);
void _rotate(double angle, Point* center);
@@ -26,20 +28,6 @@ ExPolygon::new(...)
OUTPUT:
RETVAL
-SV*
-ExPolygon::arrayref()
- CODE:
- AV* av = newAV();
- av_fill(av, THIS->holes.size()); // -1 +1
- av_store(av, 0, polygon2perl(THIS->contour));
- int i = 0;
- for (Polygons::iterator it = THIS->holes.begin(); it != THIS->holes.end(); ++it) {
- av_store(av, ++i, polygon2perl(*it));
- }
- RETVAL = sv_bless(newRV_noinc((SV*)av), gv_stashpv("Slic3r::ExPolygon", GV_ADD));
- OUTPUT:
- RETVAL
-
%}
};