Record ALLEGRO_LOCKED_REGION

Hierarchy
Methods
Properties

Unit

Declaration

type ALLEGRO_LOCKED_REGION = record

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.

See also
al_lock_bitmap
Locks an entire bitmap for reading or writing.
al_lock_bitmap_region
Like al_lock_bitmap, but only locks a specific area of the bitmap.
al_unlock_bitmap
Unlocks a previously locked bitmap or bitmap region.
ALLEGRO_PIXEL_FORMAT
Pixel formats.

Overview

Fields

data: AL_VOIDptr;
format: AL_INT;
pitch: AL_INT;
pixel_size: AL_INT;

Description

Fields

data: AL_VOIDptr;

Points to the leftmost pixel of the first row (row 0) of the locked region.

format: AL_INT;

Indicates the pixel format of the data.

pitch: AL_INT;

Gives the size in bytes of a single row (also known as the stride). The pitch may be greater than width * pixel_size due to padding; this is not uncommon. It is also not uncommon for the pitch to be negative (the bitmap may be upside down). For blocked bitmaps, 'row' refers to the row of blocks, not of pixels.

pixel_size: AL_INT;

It is the number of bytes used to represent a single block of pixels for the pixel format of this locked region. For most formats (and historically, this used to be true for all formats), this is just the size of a single pixel, but for blocked pixel formats this value is different.


Generated by PasDoc 0.15.0. Generated on 2024-11-10 15:15:06.