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

Author Topic: width of rectangle  (Read 1736 times)

0 Members and 1 Guest are viewing this topic.

Regen

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • Email
width of rectangle
« on: May 24, 2009, 11:02:36 pm »
Hi, I have a rectangleshape and now i want to get the width and height of it.

i have a function called:
bool ClickedShape(sf::Shape shape, sf::RenderWindow *App, bool click)

but it doesnt seems like I can access getwidth() of my "shape", why?
Why can't things just work?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
width of rectangle
« Reply #1 on: May 24, 2009, 11:37:43 pm »
Because there's no width in sf::Shape. You'll have to store it yourself.
Laurent Gomila - SFML developer