In french: ChargePlancheImage
Loads an image set in memory so that it can be used later by gImage
// The MULTI.BMP image includes 130 components
// No border will be displayed around each one of these components
LoadImageSheet(2, "MULTI.BMP", 16, 16)
// Display the images in a graphic list
FOR Subscript = 1 TO 10*13
ListAdd(LIST_GraphicList, gImage(2, Subscript))
<Result> = LoadImageSheet(<Image identifier> , <Image name> , <Image width> , <Image height> [, <Border>])
- True if the image set was loaded in memory,
- False otherwise.
<Image identifier>: Integer
Identifier of image loaded in memory (included between 1 and 9). If this identifier is already used, the loaded image replaces the previous image. This identifier will be used by gImage.
<Image name>: Character string
Name and full (or relative) path of image to load. A UNC path can be used.
<Image width>: Integer
Width of an image found in the image set.
<Image height>: Integer
Height of an image found in the image sheet.
<Border>: Optional character
"C" if no border must be displayed around each drawing. By default, a 1-pixel border is displayed around each drawing found in the image sheet.
The image sets includes several drawings organized in rows and columns. All these drawings must have the same size and they can be enclosed in a 1-pixel border.
Drawings are numbered from 1 to <Number of rows> * <Number of columns> from left to right and from top to bottom.
- Unlike LoadImage, if the number of drawings changes in the image, the images displayed will not be truncated and the corresponding code will not have to be modified.
- gImageExists is used to determine if an image was loaded in memory by LoadImage or LoadImageSheet.
LoadImageSheet must not be used in the project code. Indeed, this function must be used in the window where the image must be handled.
This page is also available for…