1al_create_sub_bitmap(3) Library Functions Manual al_create_sub_bitmap(3)
2
3
4
6 al_create_sub_bitmap
7
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
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 mem‐
17 ory 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 Note that destroying parents of sub-bitmaps will not destroy the sub-
30 bitmaps; instead the sub-bitmaps become invalid and should no longer be
31 used.
32
34 al_create_bitmap(3)
35
36
37
38Allegro reference manual al_create_sub_bitmap(3)