00001
00002
00003
00004
00005
00006 #ifndef __RECTANGLE_H
00007 #define __RECTANGLE_H
00008
00012 class Rectangle
00013 {
00014
00015 public:
00016
00017 Rectangle();
00018
00019 Rectangle(int x, int y, unsigned int w, unsigned int h);
00020
00021 ~Rectangle();
00022
00023 int x() const;
00024 void setX(int x);
00025
00026 int y() const;
00027 void setY(int y);
00028
00029 unsigned int width() const;
00030 void setWidth(unsigned int w);
00031
00032 unsigned int height() const;
00033 void setHeight(unsigned int h);
00034
00035 void copy(Rectangle *source);
00036
00037 bool fitsInto(Rectangle *rect);
00038
00039 private:
00040
00041 int x_, y_;
00042 unsigned int w_, h_;
00043 };
00044
00045 #endif // __RECTANGLE_H