[Qgis-developer] Re: Labels in OS X

Tom Elwertowski telwertowski at comcast.net
Sun Jul 13 01:56:46 EDT 2008


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?

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?

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.

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.

Tom


More information about the Qgis-developer mailing list