File: al_lock_bitmap_region.3

package info (click to toggle)
allegro5 2%3A5.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 23,032 kB
  • sloc: ansic: 120,340; cpp: 15,707; objc: 4,805; python: 2,915; java: 2,195; sh: 887; xml: 86; makefile: 49; perl: 37; pascal: 24
file content (35 lines) | stat: -rw-r--r-- 1,124 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
.TH "al_lock_bitmap_region" "3" "" "Allegro reference manual" ""
.SH NAME
.PP
al_lock_bitmap_region \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro.h>

ALLEGRO_LOCKED_REGION\ *al_lock_bitmap_region(ALLEGRO_BITMAP\ *bitmap,
\ \ \ int\ x,\ int\ y,\ int\ width,\ int\ height,\ int\ format,\ int\ flags)
\f[]
.fi
.SH DESCRIPTION
.PP
Like al_lock_bitmap(3), 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[] Using the ALLEGRO_LOCK_WRITEONLY with a blocked pixel
format (i.e.
formats for which al_get_pixel_block_width(3) or
al_get_pixel_block_height(3) 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(3), ALLEGRO_PIXEL_FORMAT(3), al_unlock_bitmap(3)