
If you have point high, low; then which corner is "high"? Likewise, using top_left, bottom_right is bad. In general, storing a rectangle as a set of two points is the wrong representation, especially for
"Reece Dunn" <msclrhd@hotmail.com> wrote in message news:cq90bq$r7v$1@sea.gmane.org... portability.
not "high" as in "high on the screen"; "high" as in "value is high", "higher than low". maybe "max" and "min" are better names (as in cocoa). pos x size requires knowledge about the origin, too, doesn't it? i am assuming that pos+size brings you to the opposite corner of the rectangle, and also that both components of size are positive for a non-empty rectangle. therefore pos represents different corners depending on the origin. and "a.size += gui::size(10, 20);" will move the top-right corner in e.g. cocoa and the bottom-right corner in e.g. windows. ergo no better or worse than 2 points, just different i'd definitely add operator[] to point and size, though. anywhere you can write a loop, you don't make a copy-paste error regards, michael toksvig