System.Types.UnionRect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function UnionRect(out Rect: TRect; const R1, R2: TRect): Boolean;
function UnionRect(out Rect: TRectF; const R1, R2: TRectF): Boolean;
function UnionRect(const ARect1, ARect2: TRect): TRect;
function UnionRect(const ARect1, ARect2: TRectF): TRectF;

C++

extern DELPHI_PACKAGE bool __fastcall UnionRect(/* out */ TRect &Rect, const TRect &R1, const TRect &R2)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.Types.pas
System.Types.hpp
System.Types System.Types

Description

Returns the union of two rectangles.

UnionRect returns the smallest rectangle that includes both specified rectangles.

UnionRect, with three R1, R2, and Rect parameters, returns the smallest rectangle, that includes both specified R1 and R2 rectangles. The union is returned in the Rect parameter. UnionRectF returns True if the resulting rectangle is nonempty. Otherwise, UnionRectF returns False, and Rect is set to a rectangle at the (0,0) position with 0 Width and 0 Height.

UnionRect, with two ARect1 and ARect2 parameters, returns the smallest rectangle, that includes both specified ARect1 and ARect2 rectangles.

See Also

Code Examples