Graphics.FillRoundRect

From Xojo Documentation

Method

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

Supported for all project types and targets.

Draws a rounded rectangle filled with the current color. The current color is set with the ForeColor 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 draws a rounded rectangle with a red fill and 30 pixel rounded corners.

g.ForeColor = &cff0000
g.FillRoundRect(10, 10, 100, 60, 30, 30)