Vcl.Graphics.TCustomCanvas.RoundRect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure RoundRect(X1, Y1, X2, Y2, X3, Y3: Integer); overload; virtual; abstract;
procedure RoundRect(const Rect: TRect; CX, CY: Integer); overload;

C++

virtual void __fastcall RoundRect(int X1, int Y1, int X2, int Y2, int X3, int Y3) = 0 /* overload */;
void __fastcall RoundRect(const System::Types::TRect &Rect, int CX, int CY)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics TCustomCanvas

Description

Draws a rectangle with rounded corners on the canvas.

Override the RoundRect method to implement drawing a rounded rectangle using the current pen and fill it with the current brush. The rectangle will have edges defined by the points (X1,Y1), (X2,Y1), (X2,Y2), (X1,Y2), but the corners will be shaved to create a rounded appearance. The curve of the rounded corners matches the curvature of an ellipse with width X3 and height Y3.

To draw an ellipse instead, use Ellipse. To draw a true rectangle, use Rectangle.

See Also