[GRASS-dev] improved d.labels rendering

Wolf Bergenheim wolf+grass at bergenheim.net
Mon Apr 16 18:12:30 EDT 2007


On 06.04.2007 10:22, Hamish wrote:
> Hi,
> 
> Text rotation now works properly in d.labels for any justification
> setting. Also placement is improved for all center and lower justified
> text. Even multi-line labels are working correctly.
> 
> Only lightly tested so far.

I haven't tested multi-line labels, but rotation seems to work nicely.
There is however a bug. If there is a space between the ':' and the
label text, the space becomes part of the label and thus the label is
shifted to the right by one space. I have worked around this in
v.label.sa by not adding a space between the ':' and the label text.

I have also attached a patch which will add support for a label position
"none none", which simply means to place the label at the exact point
given (no shifting in any direction). So please test this together with
the newest version of v.label.sa in the cvs. I have not enabled
compilation on it automatically (yet), so you have to run make in
vector/v.label.sa before running make install.

In other words I'm looking for feedback on the performance of this
module, v.label.sa. Not the code (it is still a bit of a mess), but the
results. I'm especially interested if you find some odd behavior. It
should behave quite nicely... but you never know. I keep finding bugs...

> For TrueType fonts you need to set the path to the font name in the
> v.label step. (run-time override won't work anymore)

Yeah. This is a very nice addition. It works really well. Just what I
needed for my v.label.sa :)

--Wolf

-- 

<:3 )---- Wolf Bergenheim ----( 8:>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: display~d.paint.labels~do_labels.c.diff
Type: text/x-patch
Size: 2954 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20070417/a1a86de1/displayd.paint.labelsdo_labels.c.bin


More information about the grass-dev mailing list