csSubRectangles2 Class Reference
[Geometry utilities]
A class managing allocations of sub-rectangles.
More...
#include <subrec2.h>
Public Methods | |
| csSubRectangles2 (const csRect ®ion) | |
| Allocate a new empty region with the given size. | |
| ~csSubRectangles2 () | |
| Remove this region and sub-regions. | |
| const csRect & | GetRectangle () const |
| Get the rectangle for this region. | |
| void | Clear () |
| Free all rectangles in this region. | |
| csSubRect2 * | Alloc (int w, int h, csRect &rect) |
| Allocate a new rectangle. | |
| void | Reclaim (csSubRect2 *subrect) |
| Reclaim a subrectangle. | |
| bool | Grow (int newWidth, int newHeight) |
| Increase the size of the region. | |
| void | Dump () |
| For debugging: dump all free rectangles. | |
Protected Attributes | |
| csRect | region |
| Dimensions of this region. | |
| csSubRect2 * | root |
| First empty region. | |
Detailed Description
A class managing allocations of sub-rectangles.i.e. this class represents a rectangular region from which a client can allocate smaller rectangles until the region is full.
Definition at line 39 of file subrec2.h.
Constructor & Destructor Documentation
|
|
Allocate a new empty region with the given size.
|
|
|
Remove this region and sub-regions.
|
Member Function Documentation
|
||||||||||||||||
|
Allocate a new rectangle. Returns 0 if there is no room |
|
|
Free all rectangles in this region.
|
|
|
For debugging: dump all free rectangles.
|
|
|
Get the rectangle for this region.
|
|
||||||||||||
|
Increase the size of the region. You can only grow upwards. |
|
|
Reclaim a subrectangle.
|
Member Data Documentation
|
|
Dimensions of this region.
|
|
|
First empty region.
|
The documentation for this class was generated from the following file:
- csgeom/subrec2.h
Generated for Crystal Space by doxygen 1.2.18
