MCPcopy Index your code
hub / github.com/MapServer/MapServer / lineObj_add

Function lineObj_add

mapscript/php/mapscript_i.c:954–973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

952 }
953
954int lineObj_add(lineObj *self, pointObj *p) {
955 if(self->numpoints == 0) { /* new */
956 self->point = (pointObj *)malloc(sizeof(pointObj));
957 if(!self->point)
958 return MS_FAILURE;
959 } else { /* extend array */
960 self->point = (pointObj *)realloc(self->point, sizeof(pointObj)*(self->numpoints+1));
961 if(!self->point)
962 return MS_FAILURE;
963 }
964
965 self->point[self->numpoints].x = p->x;
966 self->point[self->numpoints].y = p->y;
967#ifdef USE_POINT_Z_M
968 self->point[self->numpoints].m = p->m;
969#endif
970 self->numpoints++;
971
972 return MS_SUCCESS;
973 }
974
975
976/**********************************************************************

Callers 1

line.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected