Main Page   Class Hierarchy   Compound List   File List   Compound Members  

KrDirtyRectangle Class Reference

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

#include <dirtyrectangle.h>

List of all members.

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.


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:
Generated on Mon Sep 15 12:01:11 2003 for Kyra by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001