CRectIntersection

Calculates the intersection of two CRects.

Synopsis

CRect * CRectIntersection (CRect *dst, CRect *rect1, CRect *rect2)

Description

Calculates the intersection of two rectangles, returning a rectangle that describes the common area. The destination rectangle (dst) can be the same as either source rectangle. If there is no common area between the two source rectangles, the function return value is NULL, but the values in *dst are still modified.

Arguments

dst
Pointer to a CRect where the results are to be stored.
rect1
Pointer to one of the source CRects.
rect2
Pointer to the other source CRect.

Return Value

Returns dst, or NULL if there is no common area between the source rectangles.

Implementation

Library call implemented in lib3do.lib.

Associated Files

lib3do.lib, celutils.h

See Also

CRectBounds, SRectIntersection