Math-Geometry-Planar-GPC-PolygonXS
view release on metacpan or search on metacpan
PolygonXS.xs view on Meta::CPAN
SV* obj;
SV* clp;
char* action
void get_polygons(obj);
SV* obj
INIT:
int c;
gpc_polygon* p;
PPCODE:
p = (gpc_polygon*) SvIV(SvRV(obj));
PUSHMARK(SP);
if(p->num_contours < 1) {
PUTBACK;
return;
}
for(c = 0; c < p->num_contours; c++) {
XPUSHs(newRV_noinc((SV*) vertex_list_to_pts(&(p->contour[c]))));
}
( run in 0.361 second using v1.01-cache-2.11-cpan-5511b514fd6 )