.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "al_lock_bitmap_region" "3alleg5" "" "Allegro reference manual" "" .hy .SH NAME .PP al_lock_bitmap_region - Allegro 5 API .SH SYNOPSIS .IP .nf \f[C] #include ALLEGRO_LOCKED_REGION *al_lock_bitmap_region(ALLEGRO_BITMAP *bitmap, int x, int y, int width, int height, int format, int flags) \f[R] .fi .SH DESCRIPTION .PP Like al_lock_bitmap(3alleg5), but only locks a specific area of the bitmap. If the bitmap is a video bitmap, only that area of the texture will be updated when it is unlocked. Locking only the region you indend to modify will be faster than locking the whole bitmap. .RS .PP \f[I]Note:\f[R] Using the ALLEGRO_LOCK_WRITEONLY with a blocked pixel format (i.e.\ formats for which al_get_pixel_block_width(3alleg5) or al_get_pixel_block_height(3alleg5) do not return 1) requires you to have the region be aligned to the block width for optimal performance. If it is not, then the function will have to lock the region with the ALLEGRO_LOCK_READWRITE instead in order to pad this region with valid data. .RE .SH SEE ALSO .PP ALLEGRO_LOCKED_REGION(3alleg5), ALLEGRO_PIXEL_FORMAT(3alleg5), al_unlock_bitmap(3alleg5)