Bitmaps and Bitmap Sequences


Defines

#define BM_NORMAL   0
#define BM_INVERSE   1
#define BM_FLIP_X   2
#define BM_FLIP_Y   4

Functions

void draw_lib (int lib_index, int frame, int x, int y, short mode)


Compounds

     struct   BitmapA structure for creating and working with simple bitmapped objects
     struct   BitmapSequenceWhile the Bitmap structure is used for working with a single bitmap, the BitmapSequence is used for working with a Bitmap array


Detailed Description

The Bitmap structure is used for work with a single bitmap, while the BitmapSequence is used for work with a Bitmap array. (see Bitmap and BitmapSequence).


Define Documentation

#define BM_FLIP_X   2
 

Invert x coordinate.

#define BM_FLIP_Y   4
 

Invert y coordinate.

#define BM_INVERSE   1
 

Invert colors.
Obsolete (no longer supported)

#define BM_NORMAL   0
 

Keep as is.


Function Documentation

void draw_lib ( int lib_index,
int frame,
int x,
int y,
short mode )
 

Draws a bitmap in the specified position.

Parameters:
lib_index   is the index of a *.pic file in the "filer.exe" file list (the first element has a 0 index)
frame   is the index of a bitmap frame in a *.pic file (the first frame has a 0 index)
x   is the x-coordinate of a bitmap
y   is the y-coordinate of a bitmap
mode   must be one of the following: BM_NORMAL, BM_INVERSE, BM_FLIP_X, BM_FLIP_Y
Returns:
None
   #include <cybiko.h>
     ...
     // This code is from makefile for test.app
     // test.app : tmp/bytecode.bin
     //            filer.exe a test.app res/font.pic tmp/bytecode.bin $(SDK)/lib/main.e
     draw_lib( 0, 0, 10, 10, BM_NORMAL );
     // The first bitmap from the "font.pic" bitmaps sequence would be draw.
     ...
See also:
BM_NORMAL, BM_INVERSE, BM_FLIP_X, BM_FLIP_Y.