STRETCH_ON

STRETCH_ON N

STARTS THE AUTOMATIC RESIZING OF THE PICTURE DISPLAYED BY THE SYSTEM OBJECT NUMBER N

  • Type: Command
  • Parameter: 1
  • Group: System Objects

ACTION

The command STRETCH_ON N resizes the picture displayed by the system object designated by its number N to the shape of the system object. As the height and width of the picture are resized independently, the picture displayed by the system object can be distorted.

The stretching is the automatic : when the system object is resized by the commands HEIGHT and WIDTH, the displayed picture is then resized.

The system object is a PICTURE or a SCENE2D.

Remark: the automatic resizing can be stopped by the command STRETCH_OFF.

SYNTAX: STRETCH_ON N

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.

USE

  • The command STRETCH_ON is used to resize automatically the picture displayed by a PICTURE or a SCENE2D.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than 0.
  • If system object number N does not exist.
  • If system object number N is not of the type : PICTURE, SCENE2D.

EXAMPLE

rem create a SCENE2D with default position and dimensions

scene2D 1

rem load a background picture

file_load 1,"My 2D world.bmp"

rem start the automatic resizing

stretch_on 1

rem change the dimensions of SCENE2D

width 1,600

height 1,400

rem wait for 1 second

wait 1000

rem stop the automatic resizing

stretch_off 1

SEE ALSO

STRETCH_OFF