From Xojo Documentation


WebGraphics.ClearRectangle(X As Integer, Y As Integer, Width As Integer, Height As Integer)

New in 2020r1

Supported for all project types and targets.

Clears the rectangle described by the parameters passed by filling it with the background color.

Sample Code

This example clears the entire drawing area:

g.ClearRectangle(0, 0, g.Width, g.Height)