![]() |
Public API Reference |
#include <csrectrg.h>
Public Methods | |
csRectRegion () | |
Constructor. More... | |
~csRectRegion () | |
Destructor. More... | |
void | Include (const csRect &rect) |
Add a rect to this region; may cause unions, but will not adjance (see csRect). More... | |
void | Exclude (const csRect &rect) |
Exclude a rect from this region; may cause splitting. More... | |
void | ClipTo (csRect &clip) |
Clips everything in the region to the borders given. More... | |
int | Count () const |
Returns the number of rectangles in this region. More... | |
csRect & | RectAt (int i) const |
Returns the rect at a specific index. More... | |
void | makeEmpty () |
Resets the region count to zero. More... | |
Protected Methods | |
void | pushRect (csRect const &) |
Pushes a new rect into the region, increases buffer if necessary. More... | |
void | deleteRect (int) |
Removes a rect from the region. More... | |
void | fragmentRect (csRect &, csRect &, int mode) |
Controls fragmentContainedRect, used to perform all-side clipping and edge intersection. More... | |
void | fragmentContainedRect (csRect &r1, csRect &r2) |
Work method fragments rects properly when they intersect. More... | |
void | markForGather () |
Marks the current region insertion point for gather. More... | |
void | gatherFragments () |
Gathers all regions since the mark into the fragment buffer. More... | |
Protected Attributes | |
csRect * | region |
The pointer the list of regions. More... | |
int | region_count |
The number of regions currently stored. More... | |
int | region_max |
The size of the region buffer (in rects). More... | |
csRect | fragment [FRAGMENT_BUFFER_SIZE] |
The fragment buffer, used for performing fragment operations. More... | |
int | gather_mark |
The gather marker. More... |
The region may be composed of one or more rectangles that do not need to occupy the same area. The idea being that you need to be able to have a number of disparate rectangular regions for updates. This class uses csRect for nearly all rectangle operations.
To use you can Include and Exclude rectangles from this region. When finished, this class will have a list of optimal rectangles that occupy a region. If used properly, it will result in faster overall painting performance, since several areas will not require overwriting.
Definition at line 54 of file csrectrg.h.
|
Constructor.
|
|
Destructor.
|
|
Clips everything in the region to the borders given.
|
|
Returns the number of rectangles in this region.
Definition at line 98 of file csrectrg.h. References region_count. |
|
Removes a rect from the region.
|
|
Exclude a rect from this region; may cause splitting.
|
|
Work method fragments rects properly when they intersect.
|
|
Controls fragmentContainedRect, used to perform all-side clipping and edge intersection.
|
|
Gathers all regions since the mark into the fragment buffer.
|
|
Add a rect to this region; may cause unions, but will not adjance (see csRect).
|
|
Resets the region count to zero.
|
|
Marks the current region insertion point for gather.
|
|
Pushes a new rect into the region, increases buffer if necessary.
|
|
Returns the rect at a specific index.
Definition at line 100 of file csrectrg.h. |
|
The fragment buffer, used for performing fragment operations.
Definition at line 64 of file csrectrg.h. |
|
The gather marker.
Definition at line 66 of file csrectrg.h. |
|
The pointer the list of regions.
Definition at line 58 of file csrectrg.h. |
|
The number of regions currently stored.
Definition at line 60 of file csrectrg.h. Referenced by Count. |
|
The size of the region buffer (in rects).
Definition at line 62 of file csrectrg.h. |