Rect::UnionRect

Rect::UnionRect
inline void UnionRect(Rect<T> * pdest, const Rect<T> & r) const;
Description

UnionRect determines the union of two rectangles by comparing their components. The lesser x1 and y1 values and greater x2 and y2 values set the new rectangle components.

Parameters
Parameters 
Description 
Rect<T> * pdest 
A pointer to the rectangle whose components will reflect the union of the current rectangle with another rectangle. 
const Rect<T> & r 
A rectangle that is unioned with the current rectangle. 
Examples
   Rect r1(0.0, 0.0, 7.0, 7.0);
   Rect r2(2.0, 3.0, 8.0, 9.0);
   Rect r3(8.0, 9.0, 8.0, 9.0);
   Rect dest;
   r1.UnionRect(&dest, r2); // dest holds (0.000000, 0.000000, 8.00000, 9.00000)
   r1.UnionRect(&dest, r3); // dest remains uninitialized since the rectangles do not intersect