GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
bitmap_mask_color(3) Allegro manual bitmap_mask_color(3)

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

#include <allegro.h>

int bitmap_mask_color(BITMAP *bmp);

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);

MASK_COLOR_8(3), set_color_depth(3), bitmap_color_depth(3), ex3d(3), exmouse(3), expat(3)
version 4.4.3 Allegro

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.