#include <dirtyrectangle.h>
Public Methods | |
void | SetClipping (const KrRect &rect) |
Turn on clipping bounds. All subsequent rectangles will be clipped to rect. | |
bool | IsClipping () |
Returns true if clipping has been set. | |
void | AddRectangle (const KrRect &rect) |
Adds an invalid rectangle. | |
void | Clear () |
Clear the object. |
A movement typically generates 2 dirty rects: the old and new location.
Managing and merging these rectangles is potentially a tricky problem. Kyra has some good code to check for overlaps, and condense the DR list when they happen.
Generally speaking, this is used solely by the engine and does not need to be directly used. If you need to force an area of the screen to repaint (because you've draw there without Kyra's knowledge) you can add dirty rectangles to force a redraw.