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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2013-07-16 00:57:22 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-07-16 00:57:22 +0400
commitab6b3d41a72cff47b3acf642bcc4a227da97bcf4 (patch)
tree183980572bb2ccfe24dd01bd89cc3a65abf1d334 /xs/xsp/ExPolygon.xsp
parent9af2a1c007ae185ef665efe80e576b1997d2e819 (diff)
XS interface completed, including new Line class
Diffstat (limited to 'xs/xsp/ExPolygon.xsp')
-rw-r--r--xs/xsp/ExPolygon.xsp36
1 files changed, 8 insertions, 28 deletions
diff --git a/xs/xsp/ExPolygon.xsp b/xs/xsp/ExPolygon.xsp
index 27cbac901..5869db39a 100644
--- a/xs/xsp/ExPolygon.xsp
+++ b/xs/xsp/ExPolygon.xsp
@@ -5,13 +5,13 @@
#include "ExPolygon.hpp"
%}
-%name{Slic3r::ExPolygon::XS} class ExPolygon {
+%name{Slic3r::ExPolygon} class ExPolygon {
ExPolygon* clone()
- %code{% const char* CLASS = "Slic3r::ExPolygon::XS"; RETVAL = new ExPolygon(*THIS); RETVAL->in_collection = false; %};
+ %code{% const char* CLASS = "Slic3r::ExPolygon"; RETVAL = new ExPolygon(*THIS); RETVAL->in_collection = false; %};
SV* arrayref()
- %code{% RETVAL = THIS->to_SV(true, false); %};
- SV* arrayref_pp()
- %code{% RETVAL = THIS->to_SV(true, true); %};
+ %code{% RETVAL = THIS->to_SV(); %};
+ SV* pp()
+ %code{% RETVAL = THIS->to_SV_pureperl(); %};
void scale(double factor);
void translate(double x, double y);
%{
@@ -42,29 +42,9 @@ ExPolygon::rotate(angle, center_sv)
double angle;
SV* center_sv;
CODE:
- Point* center;
- if (sv_isobject(center_sv) && (SvTYPE(SvRV(center_sv)) == SVt_PVMG)) {
- center = (Point*)SvIV((SV*)SvRV( center_sv ));
- THIS->rotate(angle, center);
- } else {
- center = new Point;
- perl2point(center_sv, *center);
- THIS->rotate(angle, center);
- delete center;
- }
+ Point center;
+ center.from_SV_check(center_sv);
+ THIS->rotate(angle, &center);
%}
};
-
-%package{Slic3r::ExPolygon::XS};
-
-%{
-PROTOTYPES: DISABLE
-
-std::string
-hello_world()
- CODE:
- RETVAL = "Hello world!";
- OUTPUT:
- RETVAL
-%}