CLS

CLS

CLEAR THE BACKGROUND OF THE "2D TARGET" SYSTEM OBJECT (SAME THAN 2D_CLEAR)

  • Type: Command
  • Parameter: 0
  • Group: Drawing

ACTION

The command CLS clears the background of the "2D target" system object (set by 2D_TARGET_IS).

The next print will occurs at the origin (0,0) of the "2D target" system object, that is its upper left corner.

By default, the "2D target" system object is : FORM number 0.

The command as exactly the same effect than 2D_CLEAR and has been implemented for compatibility with old programs.

SYNTAX: CLS

USE

  • The command CLS is used to clear the background of the "2D target" system object to draw or to print on a clear surface.
  • The command CLS is used to clear the background after drawing or before drawing new things.

ERROR

  • None.

EXAMPLE

rem create an object PICTURE for drawing

picture 1

rem PICTURE takes a size of 300 x 300 pixels

width 1,300:height 1,300

rem PICTURE is the target for drawing

2d_target_is 1

rem draw a circle: center (100,100), radius = 50 pixels

2d_circle 100,100,50

rem wait 1 second

wait 1000

rem clear screen

cls

SEE ALSO

2D_CLEAR