RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Types.UnionRect Function

Returns the union of two rectangles

Pascal
function UnionRect(out Rect: TRect; const R1: TRect; const R2: TRect): Boolean;
C++
Boolean UnionRect(TRect Rect, const TRect R1, const TRect R2);

Call UnionRect to obtain the smallest rectangle that includes both R1 and R2. The union is returned as the Rect parameter. 

UnionRect returns true if the resulting rectangle is nonempty. If the resulting rectangle as a width or height that is less than or equal to 0, UnionRect returns false. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!