Skip to main content

TcxRegion.Combine(TRect,TcxRegionOperation) Method

Combines two regions.

Declaration

procedure Combine(const R: TRect; AOperation: TcxRegionOperation); overload;

Parameters

Name Type
R TRect
AOperation TcxRegionOperation

Remarks

Call any of the overloaded Combine procedure variants to combine the current and source regions or to replace the current region. The active combine mode depends on the AOperation parameter value:

  • roSet. The procedure replaces the current region with a source region.

  • roAdd, roSubtract, or roIntersect. The procedure uses the source region to modify the current region according to the specified operation. Refer to the TcxRegionOperation type description for details.

The first overloaded Combine procedure variant accepts the source region as the ARegion parameter and destroys it once a selected operation is complete. You can pass False as the ADestroyRegion optional parameter to retain the source region.

The second overloaded variant accepts a handle to the source region.

The third overloaded variant creates a temporary source region from a rectangle passed as the R parameter. The source region is destroyed once a region combine operation is complete.

See Also