From Xojo Documentation


WebGraphics.FillRectangle(x As Integer, y As Integer, width As Integer, height As Integer)

New in 2020r1

Supported for all project types and targets.

Draws a rectangle filled with the DrawingColor.


x and y are the coordinates of the top-left corner. width and height specify the size of the rectangle.

Sample Code

This example draws two red squares:

g.DrawingColor = Color.Red
g.FillRectangle(10, 10, 100, 100)
g.FillRectangle(130, 10, 100, 100)