src/rectangle.h

Go to the documentation of this file.
00001 // Copyright (c) 2003 - 2004 Anselm R. Garbe <anselmg at t-online.de>
00002 // See ../LICENSE.txt for license details.
00003 //
00004 // $Id: rectangle.h 7 2007-05-24 11:03:53Z eg1981 $
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

Generated on Thu May 24 15:19:32 2007 for ncwm by  doxygen 1.5.1