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
00022 #include "csgeom/csrect.h"
00023
00027 class csSubRect : public csRect
00028 {
00029 public:
00030 csSubRect* next, * prev;
00031
00033 csSubRect (int ixmin, int iymin, int ixmax, int iymax)
00034 : csRect (ixmin, iymin, ixmax, iymax), next (NULL), prev (NULL) { }
00035
00037 csSubRect (const csRect ©) : csRect (copy), next (NULL), prev (NULL) { }
00038 };
00039
00045 class csSubRectangles
00046 {
00047 protected:
00049 csRect region;
00051 csSubRect* first;
00052
00053 public:
00055 csSubRectangles (const csRect& region);
00056
00058 ~csSubRectangles ();
00059
00061 const csRect& GetRectangle () const { return region; }
00062
00066 void Clear ();
00067
00071 bool Alloc (int w, int h, csRect& rect);
00072
00076 void Dump ();
00077 };
00078
00079 #endif // __CS_SUBREC_H__
00080