Cicode Programming Reference > Cicode Function Categories > Display Functions Introduction > DspBmp

DspBmp

Displays a bitmap at a specified AN. This function allows you to display any bitmap file at run time. (You can get a new bitmap file from operator input or from the plant, and display it dynamically.)

Note: This function is only used for V3.xx and V4.xx animations, and was superseded in later releases.

Syntax

DspBmp(AN, sFile, Mode)

AN:

The animation-point number.

sFile:

The name of the bitmap (.BMP) file. The file needs to be in the user project path. (Does not support 1 bit, 24 bit or OS/2 bitmaps.)

Mode:

The mode of bitmap display:

0 - Erase the existing bitmap and display this bitmap.

1 - Do not erase the existing bitmap, just draw the new bitmap. (This mode provides smoother animation than Mode 0, but the bitmaps needs to be the same size).

2 - Do not erase the existing bitmap, just draw the new bitmap. This mode is similar to mode 1, but it displays the bitmap about 3 times faster. However, the bitmap should not contain any transparent color, or it will display as a random color. Use this mode for fast, smooth animation.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

DspDel

Example

// Display the bitmap "MyImage.bmp" at AN 60
DspBMP(60, "MyImage.bmp", 0)

See Also

Display Functions