1bitmap_mask_color(3)            Allegro manual            bitmap_mask_color(3)
2
3
4

NAME

6       bitmap_mask_color  -  Returns  the  mask color of the specified bitmap.
7       Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       int bitmap_mask_color(BITMAP *bmp);
14

DESCRIPTION

16       Returns the mask color for the specified bitmap  (the  value  which  is
17       skipped  when drawing sprites). For 256-color bitmaps this is zero, and
18       for truecolor bitmaps it is bright pink (maximum  red  and  blue,  zero
19       green).  A  frequent use of this function is to clear a bitmap with the
20       mask color so you can later  use  this  bitmap  with  masked_blit()  or
21       draw_sprite() after drawing other stuff on it. Example:
22
23          /* Replace mask color with another color. */
24          for (y = 0; y h; y++)
25             for (x = 0; x w; x++)
26                if (getpixel(bmp, x, y) == bitmap_mask_color(bmp))
27                   putpixel(bmp, x, y, another_color);
28
29

SEE ALSO

31       MASK_COLOR_8(3),  set_color_depth(3),  bitmap_color_depth(3),  ex3d(3),
32       exmouse(3), expat(3)
33
34
35
36Allegro                          version 4.4.3            bitmap_mask_color(3)
Impressum