** Is a label completely in the image, reserving a gutter (in pixels) inside ** image for no labels (effectively making image larger. The gutter can be ** negative in cases where a label has a buffer around it. */
| 453 | ** negative in cases where a label has a buffer around it. |
| 454 | */ |
| 455 | static int labelInImage(int width, int height, shapeObj *lpoly, int gutter) |
| 456 | { |
| 457 | int i,j; |
| 458 | |
| 459 | for(i=0; i<lpoly->numlines; i++) { |
| 460 | for(j=1; j<lpoly->line[i].numpoints; j++) { |
| 461 | if(lpoly->line[i].point[j].x < gutter) return(MS_FALSE); |
| 462 | if(lpoly->line[i].point[j].x >= width-gutter) return(MS_FALSE); |
| 463 | if(lpoly->line[i].point[j].y < gutter) return(MS_FALSE); |
| 464 | if(lpoly->line[i].point[j].y >= height-gutter) return(MS_FALSE); |
| 465 | } |
| 466 | } |
| 467 | |
| 468 | return(MS_TRUE); |
| 469 | } |
| 470 | |
| 471 | /* msTestLabelCacheCollisions() |
| 472 | ** |
no outgoing calls
no test coverage detected