Profile

ALLEGRO_LOCKED_REGION(3alleg5)

ALLEGRO_LOCKED_REGION(3alleg5)

NAME

ALLEGRO_LOCKED_REGION - Allegro 5 API

SYNOPSIS

C]
#include <allegro5/allegro.h>
typedef struct ALLEGRO_LOCKED_REGION ALLEGRO_LOCKED_REGION;
]

DESCRIPTION

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.

C]
typedef struct ALLEGRO_LOCKED_REGION {
    void *data;
    int format;
    int pitch;
    int pixel_size;
} ALLEGRO_LOCKED_REGION;
]
[bu]
I]data] points to the leftmost pixel of the first row (row 0) of the locked region.
[bu]
I]format] indicates the pixel format of the data.
[bu]
I]pitch] gives the size in bytes of a single row (also known as the stride). The pitch may be greater than C]width * pixel_size] due to padding; this is not uncommon. It is also I]not] uncommon for the pitch to be negative (the bitmap may be upside down).
[bu]
I]pixel_size] is the number of bytes used to represent a single pixel.

SEE ALSO

al_lock_bitmap(3alleg5), al_lock_bitmap_region(3alleg5), al_unlock_bitmap(3alleg5), ALLEGRO_PIXEL_FORMAT(3alleg5)

Latest Tech News
Your Notes

Sign in/Sign up

Signing in to our system allows you to post your contributions and vote on the contributions of others. It will also allow you to get extra perts like having your favorites in the cloud and having your persistent personal notes wherever you go. More will be added as we scale up our services.

By signing in to our system, you agree our Member Terms and Conditions


Sign-in with one of the following services

Almost finished!

Please select a screen name for NET SOUP.



 Please send me news and special offers from NET SOUP.

 I have read and accept the Terms of Use.

COMPLIMENTARY EXAMPLES

We have no example yet for this entry


Your Name
Now

Community Contributions and Discussions

Modify your search

View Documentation

Jobs from Indeed