Opened 14 years ago

Closed 14 years ago

#2739 closed patch (fixed)

patch to scale label buffers and offsets for printing

Reported by: mhugent Owned by: wonder
Priority: major: does not work as expected Milestone: Version 1.5.0
Component: C++ Plugins Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

The following patch adds scaling of label buffers and offsets for printing. Additionally, the font is requested in a larger size and the painter is downscaled to have a better font appearance when printing (to avoid the so-called Qt font scale bug). Finally, the buffer size is considered in the label size calculation.

Martin, could you review this patch (just to avoid I'm breaking something in the new labeling engine)? But no hurry, I know you are very busy these days.

Marco

Attachments (2)

100520_labelpatch.diff (8.1 KB ) - added by mhugent 14 years ago.
100521_labelpatch.diff (8.8 KB ) - added by mhugent 14 years ago.

Download all attachments as: .zip

Change History (4)

by mhugent, 14 years ago

Attachment: 100520_labelpatch.diff added

by mhugent, 14 years ago

Attachment: 100521_labelpatch.diff added

comment:1 by mhugent, 14 years ago

new patch version does not use 1mm margin and does not consider buffer size for curved line labels (gives better prints for curved labels compared to first patch)

comment:2 by wonder, 14 years ago

Resolution: fixed
Status: newclosed

Applied in r13599.

I've simplified the calculations of positions as it was starting to be hairy. I think the buffer size shouldn't be considered for the labels as it complicates things and actually it might be desirable to allow the buffers of neighboring labels to coalesce. But we could add a "margin" property, which would allow the user to set properly the minimum distance from other labels.

Note: See TracTickets for help on using tickets.