MCPcopy Create free account
hub / github.com/MapServer/MapServer / shapeObj_getLabelPoint

Function shapeObj_getLabelPoint

mapscript/php/mapscript_i.c:1184–1197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1182}
1183
1184pointObj *shapeObj_getLabelPoint(shapeObj *self)
1185{
1186 pointObj *point = (pointObj *)calloc(1, sizeof(pointObj));
1187 if (point == NULL) {
1188 msSetError(MS_MEMERR, "Failed to allocate memory for point", "getLabelPoint()");
1189 return NULL;
1190 }
1191
1192 if(self->type == MS_SHAPE_POLYGON && msPolygonLabelPoint(self, point, -1) == MS_SUCCESS)
1193 return point;
1194
1195 free(point);
1196 return NULL;
1197}
1198
1199
1200/**********************************************************************

Callers 1

shape.cFile · 0.85

Calls 2

msSetErrorFunction · 0.85
msPolygonLabelPointFunction · 0.85

Tested by

no test coverage detected