record AL_BITMAP

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type AL_BITMAP = record

Description

Stores the contents of a bitmap.

There is some stuff in the structure that is liable to change and you shouldn't use anything except the next. The w and h fields can be used to obtain the size of an existing bitmap:

CONST
  BS = 'Bitmap size: (%dx%d)\n';
VAR
  bmp: AL_BITMAPptr;
  Message: STRING;
BEGIN
  bmp = al_load_bitmap ('file.bmp', pal);
  StrFmt (Message, BS, [bmpˆ.w, bmpˆ.h]);
  al_allegro_message (Message);
END.

The clipping rectangle is inclusive on the left and top (0 allows drawing to position 0) but exclusive on the right and bottom (10 allows drawing to position 9, but not to 10). Note this is not the same format as that of the clipping API, which takes inclusive coordinates for all four corners. All the values of this structure should be regarded as read-only. If you want to modify the clipping region, please refrain from changing this structure. Use al_set_clip_rect instead.

See also
al_create_bitmap
Creates a memory bitmap sized w by h.
AL_RLE_SPRITE
An RLE compressed sprite.

Overview

Fields

w: AL_INT;
h: AL_INT;
clip: AL_BOOL;
cl: AL_INT;
cr: AL_INT;
ct: AL_INT;
cb: AL_INT;
id: AL_ULONG;
x_ofs: AL_INT;
y_ofs: AL_INT;
line: AL_VOIDptr;

Description

Fields

w: AL_INT;

width and height in pixels

h: AL_INT;

width and height in pixels

clip: AL_BOOL;

flag if clipping is turned on

cl: AL_INT;

clip left, right, top and bottom values

cr: AL_INT;

clip left, right, top and bottom values

ct: AL_INT;

clip left, right, top and bottom values

cb: AL_INT;

clip left, right, top and bottom values

id: AL_ULONG;

for identifying sub-bitmaps

x_ofs: AL_INT;

horizontal offset (for sub-bitmaps)

y_ofs: AL_INT;

vertical offset (for sub-bitmaps)

line: AL_VOIDptr;

ZERO_SIZE_ARRAY(unsigned char *, line);


Generated by PasDoc 0.13.0 on 2016-07-20 12:01:36