Skip to main content

CreateRoundCorners(TRect,Integer,Integer) Constructor

Creates a rectangular region with rounded corners.

Declaration

constructor CreateRoundCorners(const ABounds: TRect; AWidthEllipse: Integer; AHeightEllipse: Integer); overload;

Parameters

Name Type
ABounds TRect
AWidthEllipse Integer
AHeightEllipse Integer

Remarks

Call either of these overloaded constructors to create a rectangular region with rounded corners. Use the AWidthEllipse and AHeightEllipse parameters to specify the pixel width and height of the ellipse whose sectors form rounded corners of the resulting region. Higher values correspond to smoother curves that connect straight lines.

The first overloaded CreateRoundCorners constructor variant accepts the coordinates of the left-top and right-bottom corners of the region’s bounding rectangle as the ALeft, ATop, ARight, and ABottom parameters. These points lie outside the region’s shape due to the rounded corners.

The second overloaded constructor variant accepts the bounding rectangle as the ABounds parameter instead of individual coordinates.

See Also