Site Tools


documentation:development:opera:pf25:ppgfldr:smmfldr:ldofldr:01ldo038

ClearBitmap

Clears a screen or bitmap.

Synopsis

Err ClearBitmap (Item ioreq, Item scr_bm, Bitmap *bmPtr, int32 rgbValue)

Description

Sets all pixels in the screen or bitmap to the specified rgbValue. Uses SetVRAMPages() for fast operation.

The rgbValue is a pair of RGB555 values packed into a 32-bit word. If you don't want simple black (zero), use the MakeRGB15Pair() macro to create this value from separate red, green, and blue values.

For best performance, pass a non-zero IOreq parameter and a bitmap pointer instead of a screen or bitmap item. This will avoid LookupItem() and CreateIOReq() calls that would otherwise be made internally.

Arguments

  • ioreq IOReq item obtained from GetVRAMIOReq(), or zero to have an IOReq created and deleted internally during the call.
  • scr_bm Screen or Bitmap item number. May be zero if a Bitmap pointer is provided.
  • bmPtr Bitmap pointer. May be NULL if a Screen or Bitmap item is provided.
  • rgbValue Color value to store into all screen or bitmap pixels.

Return Value

Returns zero on success or a negative error code.

Implementation

Library call implemented in lib3do.lib.

Associated Files

lib3do.lib, displayutils.h

documentation/development/opera/pf25/ppgfldr/smmfldr/ldofldr/01ldo038.txt · Last modified: 2022/10/10 16:53 by 127.0.0.1