- Main Page
- Classes
- Files
- Directories
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# KrDirtyRectangle Class Reference

DirtyRectangle manages the rectangle made invalid when Images move or change. More...

`#include <dirtyrectangle.h>`

List of all members.

## Public Member Functions
void | SetClipping (const grinliz::Rectangle2I &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 grinliz::Rectangle2I &rect)
| Adds an invalid rectangle.
void | Clear ()
| Clear the object.

## Detailed Description

DirtyRectangle manages the rectangle made invalid when Images move or change.

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.

The documentation for this class was generated from the following file:

- dirtyrectangle.h