SHAPE

SHAPE N

CREATES A SYSTEM OBJECT SHAPE AND ALLOCATES IT NUMBER N AS REFERENCE

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

ACTION

The command SHAPE N creates a system object SHAPE and allocates it a number N. The number N will be used to designate the SHAPE.

The created SHAPE can then be used through the appropriated commands.

The SHAPE is created at position (0,0) : that is TOP = 0 pixel and LEFT = 0 pixel, with dimensions WIDTH = 65 pixels and HEIGHT = 65 pixels.

A SHAPE is an object, the shape of which can be changed by the commands SHAPE_RECTANGLE_ROUNDED, SHAPE_SQUARE_ROUNDED, SHAPE_RECTANGLE, SHAPE_ELLIPSE, SHAPE_SQUARE, SHAPE_CIRCLE.

By default, the SHAPE is a circle.

A SHAPE can generate the events : ON_MOUSE_MOVE, ON_MOUSE_UP, ON_MOUSE_DOWN.

Remark : by default, the SHAPE is created on the FORM number 0, but another FORM can be used. For that, create a FORM by FORM N, and send it all the commands by COMMAND_TARGET_IS N before creating the SHAPE.

SYNTAX: SHAPE 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

  • A SHAPE is used as an object the shape of which can be changed.

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 or equal to 0.
  • If number N is already used for a system object number.

EXAMPLE

shape 1

width 1,300

height 1,100

caption 0,"CIRCLE"

pause 2000

shape_square 1

caption 0,"SQUARE"

pause 2000

shape_square_rounded 1

caption 0,"SQUARE_ROUNDED"

pause 2000

shape_rectangle 1

caption 0,"RECTANGLE"

pause 2000

shape_rectangle_rounded 1

caption 0,"RECTANGLE_ROUNDED"

pause 2000

shape_ellipse 1

caption 0,"ELLIPSE"

pause 2000

shape_circle 1

caption 0,"CIRCLE"

SEE ALSO

SHAPE_CIRCLE

SHAPE_ELLIPSE

SHAPE_RECTANGLE

SHAPE_RECTANGLE_ROUNDED

SHAPE_SQUARE

SHAPE_SQUARE_ROUNDED