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 2.047 seconds using v1.01-cache-2.11-cpan-71847e10f99 )