Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ file_to_int(3G) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bitmap_to_file(3G)

inquire_file(3G)

file_print(3G)

file_to_bitmap(3G)

NAME

file_to_bitmap, file_to_dcbitmap, file_to_intbitmap − copy bitmapfile contents into a bitmap

SYNOPSIS

C Syntax:

void file_to_bitmap(fildes,full_depth,spn,dpn,source,xstart,ystart,
update_cmap)
int fildes,full_depth,spn,dpn;
char *source;
float xstart,ystart;
int update_cmap;

void file_to_dcbitmap(fildes,full_depth,spn,dpn,source,xstart,ystart,
update_cmap)
int fildes,full_depth,spn,dpn;
char *source;
int xstart,ystart,update_cmap;

void file_to_intbitmap(fildes,full_depth,spn,dpn,source,xstart,ystart,
update_cmap)
int fildes,full_depth,spn,dpn;
char *source;
int xstart,ystart,update_cmap;

FORTRAN77 Syntax:

subroutine file_to_bitmap(fildes,full_depth,spn,dpn,source,xstart,ystart,
update_cmap)
integer*4 fildes,full_depth,spn,dpn
character*(*) source
real xstart,ystart,update_cmap

subroutine file_to_dcbitmap(fildes,full_depth,spn,dpn,source,xstart,
ystart,update_cmap)
integer*4 fildes,full_depth,spn,dpn
character*(*) source
integer*4 xstart,ystart,update_cmap

subroutine file_to_intbitmap(fildes,full_depth,spn,dpn,source,xstart,
ystart,update_cmap)
integer*4 fildes,full_depth,spn,dpn
character*(*) source
integer*4 xstart,ystart,update_cmap

Pascal Syntax:

procedure file_to_bitmap(fildes,full_depth,spn,dpn:integer;
source:string255;xstart,ystart:real;
update_cmap:integer);

procedure file_to_dcbitmap(fildes,full_depth,spn,dpn:integer;
source:string255;xstart,ystart,
update_cmap:integer);

procedure file_to_intbitmap(fildes,full_depth,spn,dpn:integer;
source:string255;xstart,ystart,update_cmap:integer);

DESCRIPTION

Input Parameters

fildes Integer file descriptor returned by gopen when the I/O path of a bitmap device is opened. 

full_depth Indicates what source data is to be written into the bitmap.  If TRUE (1), all file planes are transferred to the bitmap (spn and dpn parameters are ignored).  If FALSE (0), the spn paramter determines a single plane to be transferred. 

spn Number of a single plane to copy from the file.  It must be in the range 0 to n−1, where n is the number of planes in the file. 

dpn Destination plane number in the bitmap.  dpn must be in the range 0 to m−1, where m is the number of planes in the bitmap. 

source Pathname of the file where the raster information is stored. 

xstart, ystart Coordinates of the upper left corner of the destination rectangle in virtual device coordinates ( file_to_bitmap, file_to_intbitmap) or device coordinates (file_to_dcbitmap).

update_cmap If TRUE (1), indicates that the software and hardware color maps are updated if there is a color table stored in the file.  If FALSE (0), or if there is not a color table in the file, the current color maps are not changed. 

Discussion

For the following discussion, pixel data is considered to be an xlen by ylen pixel rectangle, where xlen and ylen are the respective values contained in the bitmap file.  The pixel data from the source is written into the destination, beginning at xstart,ystart according to the current drawing mode and write enable. 

The actual rectangle written to the bitmap depends upon the size of the bitmap in the file and the current clipping mode.  The source rectangle is clipped to the current clipping rectangle and copied into the destination rectangle. 

For full-depth operation with multi-bank graphics devices, the currently selected bank (as set by bank_switch) is written.  If the current shade mode is CMAP_FULL and the file contains full mode data, all appropriate banks will be written. 

Conditions that might cause failure include: file not found, improper file permissions, file does not contain raster data, and requested plane does not exist. 

Integer operations are only available when using the INT_XFORM gopen mode. When in INT_XFORM mode, floating point operations are not available for that fildes. Floating point operations are the default, or can be specified with FLOAT_XFORM mode. For a list of integer operations, floating point operations and common operations see the starbase.3g manual page. 

SEE ALSO

bitmap_to_file(3G), inquire_file(3G), file_print(3G). 

Hewlett-Packard Company  —  HP-UX Release 9.10: April 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026