00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __TLRECT_H__
00018 #define __TLRECT_H__
00019
00020 #include "tlVision.h"
00021 #include "tlLocation.h"
00022 #include "tlSize.h"
00023
00024
00025 class tlRect : public tlSize, public tlLocation
00026 {
00027 public:
00028
00029
00030 tlRect ();
00031 tlRect (int x, int y, int width, int height);
00032 virtual ~tlRect ();
00033
00034
00035 int set (int x, int y, int width, int height);
00036 int set (tlPoint *p1, tlPoint *p2);
00037 int set (tlPoint *p1, int width, int height);
00038
00039
00040 int collapse (int dsize);
00041 int collapse (int dwidth, int dheight);
00042 int expand (int dsize);
00043 int expand (int dwidth, int dheight);
00044
00045
00046 int setCenter (int x, int y);
00047 int setCenter (tlPoint *p);
00048
00049
00050 int copy (tlRect *rect);
00051 int copyTo (tlRect *rect);
00052 tlRect *copy ();
00053
00054
00055 int intersect (tlRect *rect);
00056 };
00057
00058
00059 #endif
00060