Skip to main content
Pie
ra0

TcxCanvas.RoundRect(TRect,Integer,Integer) Method

Draws a rectangle with rounded corners.

Declaration

procedure RoundRect(const R: TRect; CX: Integer; CY: Integer); overload;

Parameters

Name Type
R TRect
CX Integer
CY Integer

Remarks

Call either of these overloaded procedures to draw a rectangle with rounded corners. Both RoundRect procedures use the Pen and Brush settings to draw an outline and fill it.

The first overloaded procedure variant accepts the coordinates of the left-top and right-bottom corners of the bounding rectangle as the X1, Y1, X2, and Y2 parameters. Use the X3 and Y3 parameters to specify the pixel width and height of the ellipse whose sectors form rounded corners of the resulting shape. Higher values correspond to smoother curves that connect straight lines.

The second overloaded variant accepts the target shape’s bounding rectangle as the R parameter. The CX and CY parameters correspond to the X3 and Y3 parameters of the first overloaded RoundRect procedure variant and specify the same pixel dimensions of the rounded corners.

See Also