The Clear command either clears the whole display window, or specific shapes or text displayed on it.

Clearing the display window

This command clears the display window, leaving it with a white background:

Clear Display

You can also choose a different background colour, as in this example:

Clear Display To Black

The background colour can be Black, Red, Green, Blue, Magenta, Yellow, Cyan, Purple, PaleGreen, PaleBlue, Orange, Pink, White, Maroon, Olive, DarkGreen, Teal, DarkBlue, Purple, Grey or a custom colour defined using HTML hexadecimal colour code, as in this example which leaves the display window with a blue-grey background:

Clear Display To #5B6C7F

Clearing shapes and text

You can clear shapes or text positioned at a specified X and Y coordinate, as shown in this example where shapes and text are displayed, then, after a short time, cleared from the display using Clear commands:

Draw Line From -100, 0 To 100, 0
Draw Circle With 25 Pixels Radius Centred At -100, 0
Draw Rectangle 50 Pixels Wide And 50 Pixels High Centred At 100, 0
Write "Now you see them..." Centred At 0, -50

Wait For 2 Seconds

-- Now you don't!
Clear Line At -100, 0
Clear Circle At -100, 0
Clear Rectangle At 100, 0
Clear Writing At 0, -50

You can also refer to coordinates stored in previously defined variables:

Clear Line At X, Y