Allocate a bitmap and attach bitplanes to it.
Source position: agraphics.pas line 2257
function AllocBitMap( |
sizex: LongWord; |
sizey: LongWord; |
depth: LongWord; |
flags: LongWord; |
const friend_bitmap: pBitMap |
):pBitMap; |
sizex |
|
The width (in pixels) desired for the bitmap data. |
sizey |
|
The height (in pixels) desired. |
depth |
|
The number of bitplanes deep for the allocation. Pixels with at least this many bits will be allocated. |
flags |
|
Flags for Bitmap creation (BMF_*) |
friend_bitmap |
|
Pointer to another bitmap, or nil. If this pointer is passed, then the bitmap data will be allocated in the most efficient form for blitting to friend_bitmap. |
Allocates and initializes a bitmap structure. Allocates and initializes bitplane data, and sets the bitmap's planes to point to it.
NOTE:
When allocating using a friend bitmap, it is not safe to assume anything about the structure of the bitmap data if that friend BitMap might not be a standard amiga bitmap (for instance, if the workbench is running on a non-amiga display device, its Screen^.RastPort^.BitMap won't be in standard amiga format. The only safe operations to perform on a non-standard BitMap are:
Good arguments to pass for the friend_bitmap are your window's RPort^.BitMap, and your screen's RastPort^.BitMap. Do not pass @(screenptr^.BitMap)!
BitMaps not allocated with BMF_DISPLAYABLE may not be used as Intuition Custom BitMaps or as RasInfo^.BitMaps. They may be blitted to a BMF_DISPLAYABLE BitMap, using one of the BltBitMap() family of functions.
|
Free a bitmap created by AllocBitMap() |