SFML community forums

Help => Graphics => Topic started by: flashrocket on April 16, 2015, 02:56:45 pm

Title: Question in sf::Text
Post by: flashrocket on April 16, 2015, 02:56:45 pm
I created sf::Text and used setPosition(50,50);.
but when i give getGlobalBounds(); I interestingly get the following
If you notice the attachment you see that top is showing 58 rather than 50.
Title: Re: Question in sf::Text
Post by: Laurent on April 16, 2015, 03:08:39 pm
Text is aligned on its baseline, not on its top. You would get 50 if you had the tallest possible character in your string (like an accentuated capital letter).
Title: Re: Question in sf::Text
Post by: flashrocket on April 16, 2015, 03:09:38 pm
Thank You. 8) 8)