File: ALLEGRO_LOCKED_REGION.3

package info (click to toggle)
allegro5 2%3A5.0.10-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 14,856 kB
  • ctags: 15,948
  • sloc: ansic: 87,540; cpp: 9,693; objc: 3,491; python: 2,057; sh: 829; makefile: 93; perl: 37; pascal: 24
file content (50 lines) | stat: -rw-r--r-- 1,321 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.TH ALLEGRO_LOCKED_REGION 3 "" "Allegro reference manual"
.SH NAME
.PP
ALLEGRO_LOCKED_REGION \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro.h>

typedef\ struct\ ALLEGRO_LOCKED_REGION\ ALLEGRO_LOCKED_REGION;
\f[]
.fi
.SH DESCRIPTION
.PP
Users who wish to manually edit or read from a bitmap are required to
lock it first.
The ALLEGRO_LOCKED_REGION structure represents the locked region of the
bitmap.
This call will work with any bitmap, including memory bitmaps.
.IP
.nf
\f[C]
typedef\ struct\ ALLEGRO_LOCKED_REGION\ {
\ \ \ \ void\ *data;
\ \ \ \ int\ format;
\ \ \ \ int\ pitch;
\ \ \ \ int\ pixel_size;
}\ ALLEGRO_LOCKED_REGION;
\f[]
.fi
.IP \[bu] 2
\f[I]data\f[] points to the leftmost pixel of the first row (row 0) of
the locked region.
.IP \[bu] 2
\f[I]format\f[] indicates the pixel format of the data.
.IP \[bu] 2
\f[I]pitch\f[] gives the size in bytes of a single row (also known as
the stride).
The pitch may be greater than \f[C]width\ *\ pixel_size\f[] due to
padding; this is not uncommon.
It is also \f[I]not\f[] uncommon for the pitch to be negative (the
bitmap may be upside down).
.IP \[bu] 2
\f[I]pixel_size\f[] is the number of bytes used to represent a single
pixel.
.SH SEE ALSO
.PP
al_lock_bitmap(3), al_lock_bitmap_region(3), al_unlock_bitmap(3),
ALLEGRO_PIXEL_FORMAT(3)