From Xojo Documentation

Revision as of 19:05, 3 September 2020 by THill (talk | contribs) (Text replacement - "{{Deprecated|" to "{{DeprecatedItem|")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. It will go offline as of October 2, 2023. Please visit the new Xojo documentation site! - you will be redirected shortly...

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

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.ClearRect(0, 0, g.Width, g.Height)