SFML community forums

Help => Graphics => Topic started by: drobole on December 28, 2009, 05:33:20 pm

Title: Sprite::GetCenter
Post by: drobole on December 28, 2009, 05:33:20 pm
Hello

I seem to have a strange problem with Sprite::GetCenter using the latest trunc from SVN. Basically, it always returns coordinates 0.0, 0.0

Is this a known issue?

My system is Windows 7 x64, VC++ 2008 express
Title: Sprite::GetCenter
Post by: Laurent on December 28, 2009, 05:41:03 pm
It's not the center like (width / 2, height / 2), it's the center of translation/rotation/scaling that you set with SetCenter. So yes, it's always (0, 0) until you change it :)
Title: Sprite::GetCenter
Post by: drobole on December 28, 2009, 07:00:46 pm
Quote from: "Laurent"
It's not the center like (width / 2, height / 2), it's the center of translation/rotation/scaling that you set with SetCenter. So yes, it's always (0, 0) until you change it :)


Ahh, I get it.
Thanks for the quick reply
Title: Sprite::GetCenter
Post by: Nexus on December 28, 2009, 09:41:02 pm
In SFML 2, the method is called GetOrigin(), this name is less confusing.
Title: Sprite::GetCenter
Post by: drobole on December 28, 2009, 10:41:51 pm
Quote from: "Nexus"
In SFML 2, the method is called GetOrigin(), this name is less confusing.


Agree.
So I assume SFML2 won't be backward compatible with SFML?
Title: Sprite::GetCenter
Post by: Laurent on December 28, 2009, 11:33:10 pm
Quote
So I assume SFML2 won't be backward compatible with SFML?

Absolutely, a lot of things have completely changed. That's why it is SFML 2.0 and not SFML 1.6 ;)
Title: Sprite::GetCenter
Post by: Nexus on December 29, 2009, 02:50:16 pm
Another reason to switch now to SFML 2 and not after the current project is finished in SFML 1.5. ;)

No, I am very glad that backward compatibility doesn't get first priority. Better make a clean, uniform interface and force some users to change code than keeping old relicts and begin to mark library parts as deprecated. SFML is so well-designed, it would be a pity to limit its progress.