[Overview][Types][Procedures and functions][Variables][Index] Reference for unit 'LCLIntf' (#lcl)

SubtractRect

Computes the bounding box of the geometric difference of two rectangles.

Declaration

Source position: winapih.inc line 353

function SubtractRect(

  out lprcDst: TRect;

  const lprcSrc1: TRect;

  const lprcSrc2: TRect

):Boolean;

Arguments

lprcSrc2

  

The rectangle to subtract.

Function result

False when the resulting rectangle is empty.

Description

When the rectangles do not overlap completely in either x or y direction, the result is the first rectangle (lprcSrc1).

Otherwise the overlapping area is excluded from the first rectangle.

The bounding box is the rectangle that covers the entire resulting area.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.