Difference between revisions of "Graphics.FillRectangle"

From Xojo Documentation

Line 6: Line 6:
 
| parameters=x As [[Double]], y As [[Double]], width As [[Double]], height As [[Double]]
 
| parameters=x As [[Double]], y As [[Double]], width As [[Double]], height As [[Double]]
 
| platform=all
 
| platform=all
 +
| newinversion=2019r2
 
}}
 
}}
 
{{Description
 
{{Description

Revision as of 23:26, 4 June 2019

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)