SFML community forums

General => General discussions => Topic started by: Kingdom of Fish on January 31, 2008, 02:16:33 am

Title: Sprite center
Post by: Kingdom of Fish on January 31, 2008, 02:16:33 am
This is probably a mostly personal preference but I think it would be much more logical to set default sprite center to the middle of the sprite and then set the center as +/-[0, 1] where for example -1, 1 is the top left corner.

Is there a good reason not to do so or just another set of preferences?
Title: Sprite center
Post by: Laurent on January 31, 2008, 02:33:14 am
The center can't be in the middle by default, as it's handled in Drawable but only Sprite knows its size. Think about String, for example.
Title: Sprite center
Post by: Kingdom of Fish on January 31, 2008, 02:35:24 am
Ah, that explains it.