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

Author Topic: Sprite.getSize() ??? Is there a way to do this for 2.5  (Read 1207 times)

0 Members and 1 Guest are viewing this topic.

ElectricRevolt

  • Newbie
  • *
  • Posts: 3
    • View Profile
Sprite.getSize() ??? Is there a way to do this for 2.5
« on: February 26, 2019, 06:41:38 am »
I am trying to have the size of a sprite returned so that I can change the origin to center/center but I am not sure how to do this in SFML 2.5. I was told that getSize() was depricated in 1.6.  Any idea how to achieve this?  Thanks.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Sprite.getSize() ??? Is there a way to do this for 2.5
« Reply #1 on: February 26, 2019, 07:55:24 am »
Use sprite.getLocalBounds().
Laurent Gomila - SFML developer