PCX Creation

The fg_makepcx() function creates a PCX file from the specified rectangular region of the active virtual buffer. Its first four parameters define the minimum x, maximum x, minimum y, and maximum y screen space coordinates of the region. Its fifth parameter is the name of the PCX file to create (it may include a path name). As with fg_showpcx(), the file name must be terminated with a null character. If an identically named file exists, it is overwritten. The fg_makepcx() function creates 256-color PCX files if using a palette-based virtual buffer, or 24-bit PCX files if using a direct color virtual buffer. For example, the statement

C/C++:

fg_makepcx(0,fg_getmaxx(),0,fg_getmaxy(),"NEW.PCX");

Delphi:

fg_makepcx(0,fg_getmaxx,0,fg_getmaxy,"NEW.PCX"+chr(0));

Visual Basic:

Call fg_makepcx(0, fg_getmaxx(), 0, fg_getmaxy(),
   App.Path & "\NEW.PCX")

would create a PCX file named NEW.PCX from the active virtual buffer. The fg_makepcx() function returns 0 if successful, 1 if the PCX file was not created, or 2 if there was an error allocating memory.

<< Prev

Next >>

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.