EW_RectangleList

EW_RectangleList

ew

1998 12-05


CLASS

EW_RectangleList - linked list of rectangles


SYNOPSIS

Class EW_RectangleList is basically just a doubly-linked list of EW_Rectangle's using the GPL_DoubleList template with some additional member functions. EW uses this object as a complex clipping region.


PUBLIC MEMBER FUNCTIONS



void AddRectangle(long x,long y,long w,long h)
Construct and add a rectangle of the given lower left position x,y and size w,h.



void DeleteRectangles(void)
Remove and delete all rectangles on the list.



void Prune(void)
Remove and delete all rectangles on the list whose width or height is less than 1.



long Intersect(EW_Rectangle *other,EW_RectangleList *intersection)
Compute the intersection of this list and the given other rectangle and put the pruned result into intersection. The pointer intersection can be NULL, in which case the result is discarded. Intersect returns TRUE if there was some intersecting area (the other rectangle overlapped some area of the listed rectangles).


FILES

ew/region.h rectangular region header file


SEE ALSO

EW_intro(3), EW_Rectangle(3), EW_Window(3)