Fwd: [Qgis-developer] Re: Labels in OS X

John C. Tull john.tull at wildnevada.org
Sun Jul 13 18:07:11 EDT 2008


Forgot to cc list...

---------- Forwarded message ----------
From: John C. Tull <john.tull at wildnevada.org>
Date: Sun, Jul 13, 2008 at 11:24 AM
Subject: Re: [Qgis-developer] Re: Labels in OS X
To: Tom Elwertowski <telwertowski at comcast.net>


On Sat, Jul 12, 2008 at 10:56 PM, Tom Elwertowski <telwertowski at comcast.net>
wrote:

> John C. Tull wrote:
>
>> The labels show correctly in the Terminal, e.g.:
>> Debug: Label: "Fire Mountain"
>>
>
> When the labels are displayed, is truncation always between letters or do
> you see partial letters?


Partial letters will show. Placing labels in the bottom right makes them
work, top left they disappear altogether. Variations in between those
extremes, including only seeing the top half of the label, etc. My current
fix is to place labels to bottom right. It is as if there is an invisible
box being drawn that blocks the labels, but nothing else on the map canvas.


>
>
> Have you tried changing font, size, style, alignment and rotation? Is the
> truncation different for any of these or do you see the same partial string?


Yes, as above.


>
>
> Line 399 does the display:
> painter->drawText ( dx, dy, text );
>
> Try another qDebug() line just before it to see if the value of 'text' has
> changed. I don't anywhere it could change however.


Still reporting the labels intact.


>
>
> A clipping rectangle is another possible culprit but I don't see one in
> use. There is a drawText variant that uses a QRect rather then two ints.
> When I saw your image, my suspicion was that a bad clipping rect was being
> computed and passed to drawText.
>
> If changing the label properties doesn't produce any new oddities, the only
> other thing I can think of is to look at the source for drawText to see how
> it processes its parameters.


Thanks for all the suggestions. I hope this one can be figured out, and I
appreciate your help.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20080713/191b303a/attachment.html


More information about the Qgis-developer mailing list