74 for( CRectArray::const_iterator it =
m_vRects.begin();
77 if( it->Intersects(
r ) )
94 CPosArray::iterator it;
100 if( p.
x + p.
y < it->x + it->y )
134 CPosArray::iterator it;
140 TRect Rect( it->x, it->y,
r.w,
r.h );
160 for( x = 1; x <=
r.x; x++ )
166 for( y = 1; y <=
r.y; y++ )
191 double growing_factor = 1.2;
193 #define GROW(x) static_cast<int>( (x * growing_factor) + 1 ) 208 if( pw >= maxW && ph >= maxH )
216 if( pw < maxW && ( pw < ph || ( (pw == ph) && (pRect->
w >= pRect->
h) ) ) )
void Init(int w=1, int h=1)
bool AddAtEmptySpot(TRect &r)
bool IsFree(const TRect &r) const
void AddPosition(const TPos &p)
void AddRect(const TRect &r)
bool Contains(const TPos &p) const
bool AddAtEmptySpotAutoGrow(TRect *pRect, int maxW, int maxH)