Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How to get the width of sfText in pixel?  (Read 4065 times)

0 Members and 1 Guest are viewing this topic.

dowhile

  • Newbie
  • *
  • Posts: 4
    • View Profile
How to get the width of sfText in pixel?
« on: June 13, 2012, 05:22:55 pm »
Hello,

how can I get the width of a sfText in pixels? In another topic (C++), someone refers to text.GetRect().getWidth(), but there's no sfText_getRect() function in the C binding.

(Edit: I'm using CSFML-2.0-rc)

I'm thankful for any reply.
« Last Edit: June 13, 2012, 05:42:42 pm by dowhile »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: How to get the width of sfText in pixel?
« Reply #1 on: June 13, 2012, 05:56:25 pm »
In SFML 2 the function is getGlobalBounds().
Laurent Gomila - SFML developer