BITBLIT(5)

NAME
bit* - MGR bit blit library functions

SYNOPSIS
#include bitblit.h

BITMAP *bit_load( int w, int h, unsigned char d, int size, unsigned char *src);
void *bit_save( BITMAP *bp);
BITMAP *bit_alloc( int wide, int high, DATA *data, unsigned char depth);
void bit_blit( BITMAP *dst, int dx, int dy, int width, int height, int func, BITMAP *src, int sx, int sy);
BITMAP *bit_create( BITMAP *map, int x, int y, int wide, int high);
void bit_destroy( BITMAP *map);
void bit_line( BITMAP *dst, int x0, int y0, int x1, int y1, int func);
int bit_on( BITMAP *bp, int x, int y);
BITMAP *bit_open( char *name);
int bit_point( BITMAP *map, int dx, int dy, int func);
int bit_size( int wide, int high, unsigned char depth);
void bit_grafscreen( void);
void bit_textscreen( void);
DATA *bit_initscreen( char *name, int *width, int *height, unsigned char *depth, void **devi);
void bit_bytescroll( BITMAP *map, int x, int y, int wide, int high, int delta);
int timestamp( void);
int log_start( FILE *fp);
void log_end( void);
int log_noinitial;

DESCRIPTION

  Functions
bit_load() converts size bytes of memory starting from address src in external format to a bitmap in internal format, being w pixels wide, h pixels high and d d pixels deep. bit_load() will return a pointer to the bitmap if it could be allocated, and (BITMAP*)0 otherwise. If size was too small, the bitmap will not be completely filled, if size was too big, the remaining bytes will be discarded.

bit_save() converts a bitmap in internal format to external format and returns a pointer to memory allocated for the external data.

bit_alloc() allocates memory for a bitmap of width wide, height high and depth depth. If data is not 0, then it is assumed to contain the bitmap image data already and in the right format. Warning: data will be free()ed using bit_destroy().

bit_blit: do bit blt operation

bit_create: create sub bitmap

bit_destroy: free allocated memory for bitmap

bit_line: draw a line in a bitmap

bit_on: find out if a dot in a bitmap is set

bit_open: open frame buffer bitmap

bit_point: set dot in bitmap

bit_size: return bitmap data size for entire bitmap (NOT parts of it!)

bit_grafscreen() switches the graphics hardware to display graphics mode. The contents of text mode do not need to be saved.

bit_textscreen() switches the graphics hardware to text mode. The contents of graphics mode do not need to be saved.

bit_initscreen() initializes the frame buffer and returns a pointer to the data area. The height, width and depth are filled with the frame buffer characteristics. Also, the pointer to any device-dependent data needed to manipulate the screen bitmap is set here. However, all accesses to the data area must be made using bit_* functions, so this function must not be used in application programs, it is only for implementing bit_open() on top of it, which should be used in application programs.

bit_bytescroll() is a fast vertical scroll. It is semantically equivalent to a copying bit_blit() but much faster. Its coordinates must be parted by 8.

timestamp: set timestamp for bitblit logging

If log_noinitial is set to 1, then the initial state of the display is not logged after log_start() is called.

  Bitblit operators

AUTHOR
S. A. Uhler, Thomas Heller

SEE ALSO
bitmap(5)