.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "al_get_parent_bitmap" "3alleg5" "" "Allegro reference manual" "" .hy .SH NAME .PP al_get_parent_bitmap - Allegro 5 API .SH SYNOPSIS .IP .nf \f[C] #include ALLEGRO_BITMAP *al_get_parent_bitmap(ALLEGRO_BITMAP *bitmap) \f[R] .fi .SH DESCRIPTION .PP Returns the bitmap this bitmap is a sub-bitmap of. Returns NULL if this bitmap is not a sub-bitmap. This function always returns the real bitmap, and never a sub-bitmap. This might NOT match what was passed to al_create_sub_bitmap(3alleg5). Consider this code, for instance: .IP .nf \f[C] ALLEGRO_BITMAP* a = al_create_bitmap(512, 512); ALLEGRO_BITMAP* b = al_create_sub_bitmap(a, 128, 128, 256, 256); ALLEGRO_BITMAP* c = al_create_sub_bitmap(b, 64, 64, 128, 128); ASSERT(al_get_parent_bitmap(b) == a && al_get_parent_bitmap(c) == a); \f[R] .fi .PP The assertion will pass because only \f[C]a\f[R] is a real bitmap, and both \f[C]b\f[R] and \f[C]c\f[R] are its sub-bitmaps. .SH SINCE .PP 5.0.6, 5.1.2 .SH SEE ALSO .PP al_create_sub_bitmap(3alleg5), al_is_sub_bitmap(3alleg5)