int BitmapUpdate(int bi);

 

Causes the Bitmap surface to update the screen.

 

Return Value

 

Return value not used.

 

Parameters

 

bi

The handle to the Bitmap surface.

 

Remarks

 

BitmapUpdate() will cause the Bitmap surface to be rendered after changes have been made to its data either through calls to BitmapSetPixel(), BitmapSetImage() or by modifying data returned by BitmapGetBits().

 

NOTE: Your most common error when using the Bitmap functions will be forgetting to call BitmapUpdate() and you will not see your changes to the Bitmap bits.

 

Availability

 

Available in DragonFireSDK 1.3 and later.

 

Example

 

The example below creates a 100 x 100 Bitmap surface and sets its pixels to white with full alpha.

 

#include "DragonFireSDK.h"

#include <string.h>

 

int MyBitmap;

unsigned char *MyBits;

 

void AppMain()

{  

  MyBitmap = BitmapAdd(0, 0, 100, 100);

  MyBits = BitmapGetBits(MyBitmap);

  memset(MyBits, 0xFF, 100*100*4);

  BitmapUpdate(MyBitmap);

}

 

void AppExit()

{

 

}

 

void OnTimer()

{

 

}