[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Graphics' (#lcl)

TCanvas.RoundRect

Draws a rectangle with rounded (or radiused) corners at the specified position.

Declaration

Source position: graphics.pp line 1161

public procedure TCanvas.RoundRect(

  X1: Integer;

  Y1: Integer;

  X2: Integer;

  Y2: Integer;

  RX: Integer;

  RY: Integer

); virtual;

procedure TCanvas.RoundRect(

  const Rect: TRect;

  RX: Integer;

  RY: Integer

);

Arguments

X1

  

Left coordinate for the top, left of the rectangle.

Y1

  

Top coordinate for the top, left of the rectangle.

X2

  

Right coordinate for the bottom, right of the rectangle.

Y2

  

Bottom coordinate for the bottom, right of the rectangle.

RX

  

Horizontal distance to the ellipse origin used for the rounded corners.

RY

  

Vertical distance to the ellipse origin used for the rounded corners.

Arguments

Rect

  

TRect instance with the coordinates for the rectangle vertices.

RX

  

Horizontal distance to the ellipse origin used for the rounded corners.

RY

  

Vertical distance to the ellipse origin used for the rounded corners.

Description

RoundRect is an overloaded method in TCanvas used to draw a rectangle with rounded (or radiused) corners. The overloaded variants allow the coordinates to be specified as either:

RX and RY contain the width and height (respectively) for an ellipse used to draw arc segments for the rounded corners on the rectangular shape.

RoundRect (like Rectangle) draws an outline (or borders) for the shape using the mode, style and width defined in Pen. The rounded rectangle is also filled using the style, color and/or bitmap defined in Brush.

RoundRect calls the routine in the LCL interface used to implement the method for the current widgetset.

See also

LCLIntf.RoundRect

  

Draws a rectangle with rounded corners to the specified device context.


Version 3.2 Generated 2024-02-25 Home