Rect.h 577 B

12345678910111213141516171819202122
  1. #ifndef INCLUDE_RECT_H
  2. #define INCLUDE_RECT_H
  3. namespace WalrusRPG
  4. {
  5. namespace Utils
  6. {
  7. class Rect
  8. {
  9. public:
  10. signed x, y;
  11. unsigned width, height;
  12. // We don't need a source file for two inline functions.
  13. Rect(unsigned x_, unsigned y_, signed width_, signed height_)
  14. : x(x_), y(y_), width(width_), height(height_){};
  15. Rect(unsigned x_, unsigned y_)
  16. : Rect(x_, y_, 0, 0){};
  17. Rect()
  18. : Rect(0, 0, 0, 0){};
  19. };
  20. }
  21. }
  22. #endif