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

Author Topic: Rect interpretation  (Read 1422 times)

0 Members and 1 Guest are viewing this topic.

nestor

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Rect interpretation
« on: December 12, 2010, 09:29:39 pm »
Hi, I want to know how to interpret the top, bottom, right, left members of the Rect class.
Are left & up the left-top coordinate and bottom & right the bottom-right coordinate?
If it is like this, Is the bottom-right coordinate absolute or relative to the left-top coordinate?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Rect interpretation
« Reply #1 on: December 12, 2010, 09:41:40 pm »
Quote
Are left & up the left-top coordinate and bottom & right the bottom-right coordinate?

Obviously yes :lol:

Quote
If it is like this, Is the bottom-right coordinate absolute or relative to the left-top coordinate?

Absolute. Relative would be "width" and "height".
Laurent Gomila - SFML developer

nestor

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Rect interpretation
« Reply #2 on: December 12, 2010, 09:49:40 pm »
thanks.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Rect interpretation
« Reply #3 on: December 13, 2010, 06:37:03 pm »
By the way: In SFML 2, you have a rect containing Width and Height instead of Right and Bottom.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: