rectangle.h 481 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _rectangle_h_
  2. #define _rectangle_h_
  3. #include "point.h"
  4. class Rect
  5. {
  6. public:
  7. Rect( int x1 = 0, int y1 = 0, int x2 = 0, int y2 = 0 );
  8. Rect( const Point& p1, const Point& p2 );
  9. Rect( const Rect& other );
  10. virtual ~Rect();
  11. Point TopLeft();
  12. Point BottomRight();
  13. Point CenterPoint();
  14. int Width();
  15. int Height();
  16. void SetRectEmpty();
  17. bool IsRectNull();
  18. int left;
  19. int top;
  20. int right;
  21. int bottom;
  22. };
  23. #endif