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

Author Topic: Best way to resize a sprite in SFML2  (Read 1680 times)

0 Members and 1 Guest are viewing this topic.

felixzero

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • http://guilloy.ath.cx
Best way to resize a sprite in SFML2
« on: February 06, 2012, 12:03:42 am »
Hi,

In SFML 1.x, it was possible to resize a sprite with the method Resize(). It's a very convenient way of drawing textured lines, for example.
However, in the new API, there is no such function: GetLocalBounds() seems to give it, but there is no setter for the size!
I suppose there is another way of doing it, but how?
EEEpc, Debian Lenny, gcc 4.3.2, Ocaml 3.10.2

TechRogue

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Best way to resize a sprite in SFML2
« Reply #1 on: February 06, 2012, 05:06:40 am »
In SFML2 it's Sprite::Scale(float factorX, float factorY);