Graphics.ClearRectangle

From Xojo Documentation

Revision as of 23:11, 4 June 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Method

Graphics.ClearRectangle(X As Double, Y As Double, Width As Double, Height As Double)

New in 2019r2

Supported for all project types and targets.

Clears the rectangle described by the parameters passed by filling it with the background color of the parent window (on Windows/Linux) or by clearing the context so that the background comes through (on Mac).

Sample Code

This code clears the entire drawing area:

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