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

Author Topic: Shape.Rectangle(FloatRect rect)  (Read 1852 times)

0 Members and 2 Guests are viewing this topic.

Xeon06

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Shape.Rectangle(FloatRect rect)
« on: February 25, 2010, 12:37:27 am »
Hey guys,

Extremely simple, useless and dumb question, but why doesn't Shape.Rectangle have an overload that takes a FloatRect as an argument? Instead you gotta create two Vector2s and pass em the top left bottom and right coords. That's probably just a pet peeves but something I'm wondering nonetheless.

Thanks.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Shape.Rectangle(FloatRect rect)
« Reply #1 on: February 26, 2010, 09:58:16 am »
I think the reason is consistency: All other functions for constructing shapes also take either built-in types as parameters or the corresponding sf::Vector references.

However it makes of course sense to have an overloaded function with a FloatRect parameter. Maybe the vectorized version could be dropped?