bitmap_mask_color - Man Page
Returns the mask color of the specified bitmap. Allegro game programming library.
Synopsis
#include <allegro.h>
int bitmap_mask_color(BITMAP *bmp);
Description
Returns the mask color for the specified bitmap (the value which is skipped when drawing sprites). For 256-color bitmaps this is zero, and for truecolor bitmaps it is bright pink (maximum red and blue, zero green). A frequent use of this function is to clear a bitmap with the mask color so you can later use this bitmap with masked_blit() or draw_sprite() after drawing other stuff on it. Example:
/* Replace mask color with another color. */ for (y = 0; y h; y++) for (x = 0; x w; x++) if (getpixel(bmp, x, y) == bitmap_mask_color(bmp)) putpixel(bmp, x, y, another_color);
See Also
MASK_COLOR_8(3), set_color_depth(3), bitmap_color_depth(3), ex3d(3), exmouse(3), expat(3)
Referenced By
bitmap_color_depth(3), draw_character_ex(3), draw_compiled_sprite(3), draw_gouraud_sprite(3), draw_lit_rle_sprite(3), draw_lit_sprite(3), draw_rle_sprite(3), draw_sprite(3), draw_sprite_v_flip(3), draw_trans_rle_sprite(3), draw_trans_sprite(3), ex3d(3), exmouse(3), expat(3), MASK_COLOR_8(3), masked_blit(3), stretch_sprite(3).