| 309 | } |
| 310 | |
| 311 | int msAddLine(shapeObj *p, lineObj *new_line) |
| 312 | { |
| 313 | lineObj lineCopy; |
| 314 | |
| 315 | lineCopy.numpoints = new_line->numpoints; |
| 316 | lineCopy.point = (pointObj *) malloc(new_line->numpoints*sizeof(pointObj)); |
| 317 | MS_CHECK_ALLOC(lineCopy.point, new_line->numpoints*sizeof(pointObj), MS_FAILURE); |
| 318 | |
| 319 | memcpy( lineCopy.point, new_line->point, sizeof(pointObj) * new_line->numpoints ); |
| 320 | |
| 321 | return msAddLineDirectly( p, &lineCopy ); |
| 322 | } |
| 323 | |
| 324 | /* |
| 325 | ** Same as msAddLine(), except that this version "seizes" the points |
no test coverage detected