SFML community forums

Help => General => Topic started by: nestor on December 12, 2010, 09:29:39 pm

Title: Rect interpretation
Post by: nestor 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?
Title: Rect interpretation
Post by: Laurent 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".
Title: Rect interpretation
Post by: nestor on December 12, 2010, 09:49:40 pm
thanks.
Title: Rect interpretation
Post by: Nexus 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.