Public Member Functions |
SubRect * | Alloc (int w, int h, csRect &rect) |
| Allocate a new rectangle.
|
SubRect * | AllocNoGrow (int w, int h, csRect &rect) |
| Allocate a rectangle but don't attempt growing to fit.
|
void | Clear () |
| Free all rectangles in this region.
|
bool | GetGrowPO2 () const |
| Return whether growing to PO2 dimensions is enabled.
|
const csRect & | GetMaximumRectangle () const |
| Return the upper limit of the rectangle.
|
void | SetGrowPO2 (bool growPO2) |
| Enable growing to PO2 dimensions.
|
A variation of SubRectangles that tries to place rectangles in a rectangular fashion.
This means all allocated rectangles are attempted to be placed compactly in a rectangle in the upper left corner, where as the normal SubRectangles quickly "expands" in the X and Y directions.
This variation is useful if the rectangle you fill is an upper limit but the covered area should be as small as possible. It has slightly more overhead than the normal SubRectangles, though.
Definition at line 257 of file subrec.h.