2D_IMAGE_PASTE

2D_IMAGE_PASTE N,X,Y

PASTES THE PICTURE FROM THE IMAGE NUMBER N TO THE POINT (X,Y)

  • Type: Command
  • Parameters: 3
  • Group: Drawing

ACTION

The command 2D_IMAGE_PASTE N,X,Y pastes the picture from the system object number N to the point (X,Y) of the "2D target" system object (set by 2D_TARGET_IS).

X and Y are expressed in pixels and the origin (0,0) of the coordinates is the upper left corner of the "2D target" system object.

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

The system object number N must be of the type IMAGE.

SYNTAX: 2D_IMAGE_PASTE N,X,Y

  • 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.
  • X = X-component value (integer or real) of the point.
  • Y = Y-component value (integer or real) of the point.

USE

  • The command 2D_IMAGE_PASTE is used to fill an area with a picture.

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 not the number of an object IMAGE.
  • If X or Y is not a correct expression.

EXAMPLE

rem multiply the buttons!

button 1:caption 1,"False button"

top 1,10:left 1,10

image 2

rem grab the screen

2d_image_copy 2,0,0,100,100

rem paste the screen

2d_image_paste 2,80,0

caption 1,"True button"

SEE ALSO

2D_IMAGE_COPY

IMAGE