.\" Generated by the Allegro makedoc utility .TH bitmap_mask_color 3alleg4 "version 4.4.3" "Allegro" "Allegro manual" .SH NAME bitmap_mask_color \- Returns the mask color of the specified bitmap. Allegro game programming library.\& .SH SYNOPSIS .B #include .sp .B int bitmap_mask_color(BITMAP *bmp); .SH 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: .nf /* 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); .fi .SH SEE ALSO .BR MASK_COLOR_8 (3alleg4), .BR set_color_depth (3alleg4), .BR bitmap_color_depth (3alleg4), .BR ex3d (3alleg4), .BR exmouse (3alleg4), .BR expat (3alleg4)