Xbasic

UI_BITMAP_CREATE_FROM_XPM Function

Description

The UI_BITMAP_CREATE_FROM_XPM() function creates a bitmap in XPM format, which supports Alpha Anywhere named colors.

Discussion

Result_Flag as L = UI_BITMAP_CREATE_FROM_XPM(C name,C xpm_format) name The name of the bitmap to create. xpm_format Character

Example

The function makes it easy to create a named bitmap from an XPM format, which is a pixel map. This example uses a 4 color palette because transparency doesn't work in a 2 color palette.

ui_bitmap_create_from_xpm("xpm",<<%str% 
9 9 4 1 
R c Red 
. c 
X c 
- c 
......... 
.RRRRRRR. 
.RR...RR. 
.R.R.R.R. 
.R..R..R. 
.R.R.R.R. 
.RR...RR. 
.RRRRRRR. 
......... 
%str%) 

ui_dlg_box("XPM",<<%dlg% 
{image=xpm} 
%dlg%)

Limitations

Desktop applications only.

See Also