bmap_fill (BMAP* bmap,COLOR* color,var alpha);
Fills a bmap with a given color and alpha transparency value.
Parameters:
bmap |
target bitmap. |
color |
the fill color, BGR vector. |
alpha |
the fill alpha value in percent. |
Speed:
Medium
Remarks
- The bitmap does not need to be locked.
- Only normal 16, 24, or 32 bit bitmaps (1555, 4444, 888, or 8888 format) can
be filled. Bitmaps in a special format, compressed DDS bmaps, or bitmaps used
as render target can not be modified.
-
When the bitmap is purged or changes its format - for instance when it's used for an overlay - it must be filled again.
Example:
// fill a bmap with semitransparent blue
bmap_fill(my_bmap,vector(255,0,0),50);
See also:
bmap_unlock, bmap_lock,
bmap_blit, pixel_for_bmap, pixel_for_vec
► latest
version online