BitmapPut Function (ROM Call 0x187)

graph.h

void BitmapPut (short x, short y, const void *BitMap, const SCR_RECT *clip, short Attr);

Puts a bitmap to the screen.

BitmapPut puts a bitmap BitMap (which was taken using BitmapGet) on the screen at position (xy), using the attribute Attr. The drawn bitmap will be clipped at the boundaries of the area given by the clip parameter. See SetCurClip for more info about clipping areas. The following attributes are supported:

A_REPLACEReplace the destination region with the source bitmap
A_REVERSEReplace the destination region with the inverse of the source bitmap
A_NORMALOR the source bitmap into the destination region
A_XORExculsive-OR the source bitmap into the destination region
A_OROR the source bitmap into the destination region
A_ANDAND the source bitmap into the destination region
A_SHADEDMask the source bitmap so that every other pixel is turned off and replace the destination region with that result (the source region is left unchanged)

See SetCurAttr command for more general info about attributes.

It seems that the A_REVERSE attribute is broken in current implementations of this function: If the value of x is not a multiple of 8, a black vertical line will appear across the picture.

Note: The sprites.h header file supports much faster alternatives to the BitmapPut function for bitmap shapes which are not wider than 32 pixels (useful for games programming).


Uses: ScrRectOverlap, memcpy, TIOS_abs
Used by: ScrRectScroll, ScrRectShift, MenuKey, WinBackupToScr, WinBitmapPut, ROM Call 0x420, ROM Call 0x421, WinRemove


See also: BitmapGet, CalcBitmapSize