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

Author Topic: Sprite center  (Read 3873 times)

0 Members and 1 Guest are viewing this topic.

Kingdom of Fish

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Sprite center
« 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Sprite center
« Reply #1 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.
Laurent Gomila - SFML developer

Kingdom of Fish

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Sprite center
« Reply #2 on: January 31, 2008, 02:35:24 am »
Ah, that explains it.

 

anything