1al_create_sub_bitmap(3)                                al_create_sub_bitmap(3)
2
3
4

NAME

6       al_create_sub_bitmap - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              ALLEGRO_BITMAP *al_create_sub_bitmap(ALLEGRO_BITMAP *parent,
12                 int x, int y, int w, int h)
13

DESCRIPTION

15       Creates a sub-bitmap of the parent, at the specified coordinates and of
16       the specified size.  A sub-bitmap is a bitmap that shares drawing memo‐
17       ry  with  a pre-existing (parent) bitmap, but possibly with a different
18       size and clipping settings.
19
20       The sub-bitmap may originate off or extend past the parent bitmap.
21
22       See the discussion in al_get_backbuffer(3) about using  sub-bitmaps  of
23       the backbuffer.
24
25       The parent bitmap’s clipping rectangles are ignored.
26
27       If a sub-bitmap was not or cannot be created then NULL is returned.
28
29       When  you  are  done  with  using  the  sub-bitmap you must call al_de‐
30       stroy_bitmap(3) on it to free any resources allocated for it.
31
32       Note that destroying parents of sub-bitmaps will not destroy  the  sub-
33       bitmaps; instead the sub-bitmaps become invalid and should no longer be
34       used for drawing - they still must be  destroyed  with  al_destroy_bit‐
35       map(3)  however.   It  does not matter whether you destroy a sub-bitmap
36       before or after its parent otherwise.
37

SEE ALSO

39       al_create_bitmap(3)
40
41
42
43Allegro reference manual                               al_create_sub_bitmap(3)
Impressum