Opened 19 years ago
Last modified 12 years ago
#1355 new defect
labelInImage and buffer usage
Reported by: | assefa | Owned by: | sdlime |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description (last modified by )
Just raising an issue I just saw related to Bug 1353. Here is labelInImage the function int labelInImage(int width, int height, shapeObj *lpoly, int buffer) { int i,j; for(i=0; i<lpoly->numlines; i++) { for(j=1; j<lpoly->line[i].numpoints; j++) { if(lpoly->line[i].point[j].x < -buffer) return(MS_FALSE); if(lpoly->line[i].point[j].x >= width+buffer) return(MS_FALSE); if(lpoly->line[i].point[j].y < -buffer) return(MS_FALSE); if(lpoly->line[i].point[j].y >= height+buffer) return(MS_FALSE); } } return(MS_TRUE); } It is called from mapgd like this : labelInImage(img->sx, img->sy, cachePtr->poly, labelPtr- >buffer+map_edge_buffer) ... - the polygon used to do the testing *already contains* the buffer (the buffer here is the buffer defined in the label object) My issue is the following : * why is labelInImage try to substruct the buffer when doing the test. Doing this makes it ignore the buffer that the user wanted and labels might be at the edge of the image. * the changes done for bug 1353 (map_edge_buffer) should be revisited by either calling the labelinimage function with a negative value or updating the labelinimage function to do the tests diffrently.
Change History (2)
comment:2 by , 12 years ago
Description: | modified (diff) |
---|
Refactored labelInImage() in r12911 (branch-6-0). Will commit to trunk as part of RFC 77 work. -Steve
Note:
See TracTickets
for help on using tickets.