create_sub_bitmap(3)

NAME
create_sub_bitmap

SYNOPSIS
#include <allegro.h>

BITMAP *create_sub_bitmap(BITMAP *parent, int x, y, width, height);

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

SEE ALSO
create_bitmap(3), create_bitmap_ex(3), destroy_bitmap(3), is_sub_bitmap(3)