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

Author Topic: SFML 2.0 Sprite sizes  (Read 8954 times)

0 Members and 1 Guest are viewing this topic.

Chocolatesheep

  • Newbie
  • *
  • Posts: 17
    • View Profile
SFML 2.0 Sprite sizes
« on: May 12, 2012, 02:02:48 am »
I couldn't find this in the documentation. How do I get the width and height of a sprite? In 1.6 it was just Sprite.GetSize();
And how is the Sprite.getGlobalBounds(); function used?
« Last Edit: May 12, 2012, 02:05:59 am by Chocolatesheep »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML 2.0 Sprite sizes
« Reply #1 on: May 12, 2012, 11:23:20 am »
getGlobalBounds() returns a rectangle which contains width and height, see documentation.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Chocolatesheep

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: SFML 2.0 Sprite sizes
« Reply #2 on: May 12, 2012, 10:29:45 pm »
Thank you