1BITMAP(3)                       Allegro manual                       BITMAP(3)
2
3
4

NAME

6       BITMAP  -  Stores  the  contents  of a bitmap. Allegro game programming
7       library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       typedef struct BITMAP
14

DESCRIPTION

16          int w, h;               - size of the bitmap in pixels
17          int clip;               - non-zero if clipping is turned on
18          int cl, cr, ct, cb;     - clip rectangle left, right, top,
19                                    and bottom
20          unsigned char *line[];  - pointers to the start of each line
21
22       There is some other stuff in the structure as well, but it is liable to
23       change and you shouldn't use anything except the above. The `w' and `h'
24       fields can be used to obtain the size of an existing bitmap:
25
26          bmp = load_bitmap("file.bmp", pal);
27          allegro_message("Bitmap size: (%dx%d)\n", bmp->w, bmp->h);
28
29       The clipping rectangle is inclusive on the left and top (0 allows draw‐
30       ing  to  position  0)  but exclusive on the right and bottom (10 allows
31       drawing to position 9, but not to 10). Note this is not the same format
32       as  that of the clipping API, which takes inclusive coordinates for all
33       four corners.  All the values of this structure should be  regarded  as
34       read-only,  with  the  exception  of  the  line  field, whose access is
35       described in depth in the "Direct access to video  memory"  section  of
36       the  manual.  If you want to modify the clipping region, please refrain
37       from changing this structure.  Use set_clip_rect() instead.
38
39

SEE ALSO

41       create_bitmap(3),       set_clip_rect(3),        bitmap_color_depth(3),
42       RLE_SPRITE(3), COMPILED_SPRITE(3)
43
44
45
46Allegro                          version 4.2.2                       BITMAP(3)
Impressum