Graphics.FillRectangle

From Xojo Documentation

Revision as of 15:33, 7 October 2019 by PLefebvre (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Method

Graphics.FillRectangle(x As Double, y As Double, width As Double, height As Double)

New in 2019r2

Supported for all project types and targets.

Draws a 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 rectangle.

Sample Code

This example (in the Paint event of a Canvas control) draws a rectangle with a red interior.

g.DrawingColor = &cff0000 // Red
g.FillRectangle(10, 10, 100, 60)