fgi_display() (Fastgraph/Image)

Win32 DirectX Fastgraph/Light

Prototype

int fgi_display (char *filename, int flags, int handle);

Function fgi_display (ByVal filename As String, ByVal flags As Long, ByVal handle As Long) As Long

function fgi_display (filename : string; flags, handle : integer) : integer;

Description

The fgi_display() function displays a BMP, JPEG, PCX, AVI, flic, or pixel run file stored in an FGI library. If the image is a BMP, JPEG, AVI, or flic file, it will be displayed with its upper left corner at (0,0), unless the flags parameter specifies the image will be displayed relative to the current graphics cursor position. If the image is a PCX file, it will be displayed in the active virtual buffer at the position specified in the file header, unless we specify otherwise through the flags parameter. If it is a pixel run file, its lower left corner will be at the graphics cursor position in the active virtual buffer.

You can use Fastgraph's fg_imagebuf() function to specify the size and address of the internal buffer when displaying images with fgi_display(). The default internal buffer size is 4,096 bytes. Image display is typically faster when a larger buffer is used.

Parameters

filename is the name of the image file to display. It may only include a file name and extension (such as PICTURE.PCX) and must be terminated by a null character (that is, a zero byte).

flags is a series of flags that controls how the image is displayed if it is a BMP, JPEG, PCX, AVI, or flic image (this parameter is ignored for pixel run images). Please refer to the descriptions of the fgi_showbmp(), fgi_showjpeg(), fgi_showpcx(), fgi_showavi(), and fgi_showflic() functions for the meanings of the individual flag bits as they apply to each image type.

handle is the file handle for the FGI library containing filename.

Return value

0 = Success

-1 = Error reading the FGI library

-2 = The requested file is not in the FGI library

-3 = The requested file is not a BMP, JPEG, PCX, AVI, flic, or pixel run file

Restrictions

A logical palette must be defined and realized in order to use the palette values stored in an image file.

AVI and FLI/FLC images will play one time. If you need to play such files more than once, use fgi_showavi() or fgi_showflic().

See also

fg_imagebuf(), fgi_read(), fgi_showavi(), fgi_showbmp(), fgi_showflic(), fgi_showjpeg(), fgi_showpcx()

Examples

FGIW1

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.