Graphics.FillRoundRectangle

From Xojo Documentation

Method

Graphics.FillRoundRectangle(x As Double, y As Double, width As Double, height As Double, arcWidth As Double, arcHeight As Double)

New in 2019r2

Supported for all project types and targets.

Draws a rounded rectangle filled with the current color. The current color is set with the DrawingColor property.

Notes

x and y are the coordinates of the top-left corner. width and height specify the size of the round rectangle. arcWidth and arcHeight control the shape of the corners in the horizontal and vertical axes, respectively. They are the distance (in points) from the corner at which the arc begins. Setting them to zero results in a rectangle with sharp corners.

Sample Code

This example (in the Paint event of a Canvas control) draws a rounded rectangle with a red fill and 30 pixel rounded corners.

g.DrawingColor = &cff0000
g.FillRoundRectangle(10, 10, 100, 60, 30, 30)