Opened 16 years ago
Closed 16 years ago
#2382 closed enhancement (fixed)
legend does not support multiline labels
Reported by: | tbonfort | Owned by: | tbonfort |
---|---|---|---|
Priority: | normal | Milestone: | 5.2 release |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | yjacolin, sdlime, dmorissette |
Description
when rendering text labels for a legend, the labelObj's WRAP parameter isn't taken into account.
this is probably because the legend labelling function doesn't really support linebreaks (when they are present, all legend items are resized to accomodate a multiline label, and the baseline of the rendered text is false).
two steps to fix this:
- make the legend rendering function aware of multiline labels (which means using the heights[] array instead of discarding its data)
- add a call to replace the label's wrap parameter with \n
Steve, Daniel, attached is a patch to fix both these issues, does this warrant more than this bugreport before I commit it?
Attachments (1)
Change History (4)
by , 16 years ago
Attachment: | legendmultiline.patch added |
---|
comment:1 by , 16 years ago
Milestone: | → 5.2 release |
---|---|
Type: | defect → enhancement |
Thomas: I don't think a feature addition like this requires an RFC, the bug is sufficient. Patch looks good so go ahead.
Steve
comment:2 by , 16 years ago
commited in r7005 I rewrote the layer/class looping to avoid having to test for scale dependant visibility over and over again. Even though valgrind doesn't show anything special, I'm leaving open for the time being as it uses a linked list that could go through some more testing.
patch to enable multiline legend labels