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

NAME

6       create_sub_bitmap  - Creates a memory sub bitmap. Allegro game program‐
7       ming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       BITMAP *create_sub_bitmap(BITMAP *parent, int x, y, width, height);
14

DESCRIPTION

16       Creates a sub-bitmap, ie. a bitmap sharing drawing memory with  a  pre-
17       existing  bitmap,  but possibly with a different size and clipping set‐
18       tings. When creating a sub-bitmap of the mode-X screen, the x  position
19       must  be a multiple of four. The sub-bitmap width and height can extend
20       beyond the right and bottom edges of the parent (they will be clipped),
21       but the origin point must lie within the parent region.
22

RETURN VALUE

24       Returns  a pointer to the created sub bitmap, or NULL if the sub bitmap
25       could not be created. Remember to free the sub  bitmap  before  freeing
26       the parent bitmap to avoid memory leaks and potential crashes accessing
27       memory which has been freed.
28
29

SEE ALSO

31       create_bitmap(3), create_bitmap_ex(3),  destroy_bitmap(3),  is_sub_bit‐
32       map(3),   clear_bitmap(3),  clear_to_color(3),  expat(3),  exscroll(3),
33       exswitch(3)
34
35
36
37Allegro                          version 4.4.3            create_sub_bitmap(3)
Impressum