Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
How would I get the width of text in 3.0.
Print
Pages: [
1
]
Author
Topic: How would I get the width of text in 3.0. (Read 168 times)
0 Members and 1 Guest are viewing this topic.
Smavery
Newbie
Posts: 1
How would I get the width of text in 3.0.
«
on:
January 01, 2025, 08:43:11 am »
in 2.6 I could use "text.getLocalBounds().width" how would I do this in 3.0
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11070
Re: How would I get the width of text in 3.0.
«
Reply #1 on:
January 01, 2025, 01:01:59 pm »
sf::Rect
has
size
and
position
as properties now, so in order to access
width
you'd call
size.x
.
Check out the migration guide for more details:
https://www.sfml-dev.org/tutorials/3.0/getting-started/migrate/#sfrectt
Logged
Official FAQ:
https://www.sfml-dev.org/faq/
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
How would I get the width of text in 3.0.
anything