<<

Contents

Search

>>

 

LOAD_PICTURE

 

 

Function

 

 

Syntax:

LOAD_PICTURE(<Row>,<Column>,<Height in Rows>,<Width in Columns>,<Mode>,<Delete>,<Image Name>[,<Handle>,<Load From Server>])

 

<Row>

= <NUM-EXPRESSION>

<Column>

= <NUM-EXPRESSION>

<Height in Rows>

= <NUM-EXPRESSION>

<Width in Columns>

= <NUM-EXPRESSION>

<Mode>

= <NUM-EXPRESSION>

<Delete>

= <NUM-EXPRESSION>

<Image Name>

= <STRING-EXPRESSION>

<Handle>

= <NUM-EXPRESSION>

<Load From Server>

= <NUM-EXPRESSION>

 

 

Meaning:

Paints an image on the screen.

 

LOAD_PICTURE returns the following values:

 

0: no error

-1: window not found

7500: image not found

 

Attention: NOREPAINT has no effect with LOAD_PICTURE in a Html Programm.

 

<Row> and <Column> specify the position of the upper left corner of the image.

 

<Height in Rows> and <Width in Columns> specify the size in rows and columns, in which the image is to be shown. These two parameters only have a meaning with <Mode> = 1.

 

<Handle> specifies in which window the image is displayed. <Handle> can contain the window depth or the handle of a split window or a WINDOWCALL window. If the parameter <Handle> is missing, the image is displayed in the current window.

 

The variable EBUS_PAINT specifies when the image is to be shown. If EBUS_PAINT <> -1, the image is the first to be painted when the screen is painted. This means that following paint functions like FILLRECT overwrite the image. If EBUS_PAINT = -1, the image is painted accordingly to the order of the paint functions.

 

Example 1:
EBUS_PAINT = 0

H% = FILLRECT(...)

H% = LOAD_PICTURE(...)

The image is painted before FILLRECT(..) and possibly overlapped by FILLRECT(...).

 

Example 2:

EBUS_PAINT = -1

H% = FILLRECT(...)

H% = LOAD_PICTURE(...)

FILLRECT(..) is executed first and then LOAD_PICTURE. It is possible that the image overlaps the area painted by FILLRECT.

 

It is possible to load images from WEB. The <Image Name> has to start with one of the following prefixes:

 

http:

https:

ftp:

ftps:

 

Parameter:

Row

Row of upper left corner

 

Column

Column of upper left corner

 

Height in Rows

Height of image in lines

 

Width in Columns

Width of image in columns

 

Mode

0: The image is shown in its original size.

1: The image is enlarged or reduced to the size specified by <Height in Rows> and <Width in Columns> .

2: The image fills the whole current window or main window. It is automatically enlarged or reduced. In this case <Row> and <Column> do not have any meaning.

 

Delete

This parameter specifies whether existing images in the current window are to be deleted.

 

If <Delete> = 1, all existing images in the current window are deleted before the new image is shown.

 

If <Delete> = 2, only the image at position <Row>,<Column> is deleted. 

 

If <Delete> <> 1 and <> 2, no images are deleted.

 

Note: If an image is loaded at the same position and with the same parameters as a previous image and if  the old image is not deleted, two images overlap.

 

Image Name

Name of the image

 

In Html Programs the image has to be made available by a #ADD_IMAGE instruction when <Load From Server> = 0.

 

Handle

Window depth or handle of a split window or handle of a WINDOWCALL Window

 

Load From Server

Specifies with 2T-programs whether the image is to be loaded by the Server or the Client. Usually images are loaded by the Client. If <Load From Server> = 1, the image is loaded by the Server and transferred to the Client. If this parameter is missing, then this is equivalent to <Load From Server> = 0.

 

Sample:

H% = LOAD_PICTURE(5,10,0,0,0,0,"Photo.jpg")

IF H% <> 0

THEN ... Error ...

ENDIF

 

See also:

MOVE_PICTURE

REMOVE_PICTURE

IMAGE_TRANSPARENTCOLOR

PLAY_PICTURES

EBUS_PAINT

EBUS_PICTURE_CACHING