Skip to main content
Pie
ra0

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCanvas.RoundRect(TRect,Integer,Integer) Method

Draws a rectangle with rounded corners.

#Declaration

Delphi
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