A rectangle class.Warning: w and h should _never_ be negative.
More...
#include <Rect.hh>
Public Member Functions | |
| Rect (int x, int y, int w, int h) | |
| Rect (const Point &pos, const Point &size) | |
| bool | inside (const Point &pos) const |
| Point | getPos () const |
| Point | getSize () const |
| Rect & | operator+= (const Rect &rhs) |
| Rect & | operator+= (const Point &rhs) |
| Rect & | operator-= (const Point &rhs) |
| Rect & | operator|= (const Rect &rhs) |
| Rect & | operator&= (const Rect &rhs) |
Public Attributes | |
| int | x |
| int | y |
| int | w |
| int | h |
Friends | |
| bool | operator== (const Rect &lhs, const Rect &rhs) |
| bool | operator!= (const Rect &lhs, const Rect &rhs) |
| Rect | operator+ (const Rect &lhs, const Rect &rhs) |
| Rect | operator+ (const Rect &lhs, const Point &rhs) |
| Rect | operator- (const Rect &lhs, const Point &rhs) |
| Rect | operator* (const Rect &lhs, double factor) |
| Rect | operator| (const Rect &lhs, const Rect &rhs) |
| Rect | operator& (const Rect &lhs, const Rect &rhs) |
| std::ostream & | operator<< (std::ostream &os, const Rect &p) |
A rectangle class.
Warning: w and h should _never_ be negative.
1.6.3