Opened 16 years ago

Closed 13 years ago

#2415 closed defect (fixed)

label background billboard is incorrectly drawn if using BUFFER

Reported by: tbonfort Owned by: sdlime
Priority: normal Milestone:
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc: sdlime

Description

if setting BUFFER on a label obj, and using BACKGROUNDCOLOR and/or BACKGROUNDSHADOWCOLOR, the background billboard covers the area of the whole buffer instead of just the label text.

fix: the background billboard should use its own shape instead of using cachePtr->poly

Steve: I've got this fixed locally, by keeping a copy of the text bounding box (using get_metrics with buffer=1) but don't really like the approach because get_metrics allocates a lineObj and pointObjs each time it is called. what do you think of changing get_metrics so it fills a pre-allocated lineObj/pointObj instead of creating its own?

Change History (3)

comment:1 by sdlime, 16 years ago

I think I see what you're getting at, we allocate those stucts before processing the cache and then reuse them. Sounds like a reasonable change. The parameter list for that function is getting pretty long though.

Steve

comment:2 by tbonfort, 16 years ago

commited in r7120

get_metrics is now a wrapper function for get_metrics_line , the latter expecting that the supplied lineObj already has an allocated array of at least 5 pointObjs.

Steve: have any comments on the fix? I'll let you close if its ok for you.

comment:3 by tbonfort, 13 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.