rectangle.h 403 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "point.h"
  3. class Rect
  4. {
  5. public:
  6. Rect( int x1 = 0, int y1 = 0, int x2 = 0, int y2 = 0 );
  7. Rect( const Point& p1, const Point& p2 );
  8. Rect( const Rect& other );
  9. virtual ~Rect();
  10. Point TopLeft();
  11. Point BottomRight();
  12. Point CenterPoint();
  13. int Width();
  14. int Height();
  15. int left;
  16. int top;
  17. int right;
  18. int bottom;
  19. };