00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __CS_SUBREC_H__
00020 #define __CS_SUBREC_H__
00021
00028 #include "csgeom/csrect.h"
00029
00033 class csSubRect : public csRect
00034 {
00035 public:
00036 csSubRect* next, * prev;
00037
00039 csSubRect (int ixmin, int iymin, int ixmax, int iymax)
00040 : csRect (ixmin, iymin, ixmax, iymax), next (0), prev (0) { }
00041
00043 csSubRect (const csRect ©) : csRect (copy), next (0), prev (0) { }
00044 };
00045
00051 class csSubRectangles
00052 {
00053 protected:
00055 csRect region;
00057 csSubRect* first;
00058
00059 public:
00061 csSubRectangles (const csRect& region);
00062
00064 ~csSubRectangles ();
00065
00067 const csRect& GetRectangle () const { return region; }
00068
00072 void Clear ();
00073
00077 bool Alloc (int w, int h, csRect& rect);
00078
00082 void Dump ();
00083 };
00084
00087 #endif // __CS_SUBREC_H__
00088