Sophie

Sophie

distrib > Arklinux > devel > x86_64 > media > main > by-pkgid > c13bc007afe382f898b3b1cfcaf62e82 > files > 785

allegro-devel-4.4.1.1-2ark.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><title>
Allegro Manual: Truecolor pixel formats
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" title="Default" type="text/css" href="allegro.css"></head><body bgcolor=white text=black link="#0000ee" alink="#ff0000" vlink="#551a8b">
<h1><a name="Truecolor pixel formats">Truecolor pixel formats</a></h1>

<ul>
<li><a href="#geta">geta</a> &mdash; Extract a color component from the current pixel format.
<li><a href="#geta32">geta32</a> &mdash; Extract the alpha component form a 32-bit pixel format color.
<li><a href="#geta_depth">geta_depth</a> &mdash; Extract a color component from a color in a specified pixel format.
<li><a href="#getb">getb</a> &mdash; Extract a color component from the current pixel format.
<li><a href="#getb15">getb15</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getb16">getb16</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getb24">getb24</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getb32">getb32</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getb8">getb8</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getb_depth">getb_depth</a> &mdash; Extract a color component from a color in a specified pixel format.
<li><a href="#getg">getg</a> &mdash; Extract a color component from the current pixel format.
<li><a href="#getg15">getg15</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getg16">getg16</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getg24">getg24</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getg32">getg32</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getg8">getg8</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getg_depth">getg_depth</a> &mdash; Extract a color component from a color in a specified pixel format.
<li><a href="#getr">getr</a> &mdash; Extract a color component from the current pixel format.
<li><a href="#getr15">getr15</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getr16">getr16</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getr24">getr24</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getr32">getr32</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getr8">getr8</a> &mdash; Extract a color component from the specified pixel format.
<li><a href="#getr_depth">getr_depth</a> &mdash; Extract a color component from a color in a specified pixel format.
<li><a href="#makeacol">makeacol</a> &mdash; Converts RGBA colors into display dependent pixel formats.
<li><a href="#makeacol32">makeacol32</a> &mdash; Converts an RGBA color into a 32-bit display pixel format.
<li><a href="#makeacol_depth">makeacol_depth</a> &mdash; Converts RGBA colors into display dependent pixel formats.
<li><a href="#makecol">makecol</a> &mdash; Converts an RGB value into the current pixel format.
<li><a href="#makecol15">makecol15</a> &mdash; Converts an RGB value into a display dependent pixel format.
<li><a href="#makecol15_dither">makecol15_dither</a> &mdash; Calculates a dithered 15 or 16-bit RGB value.
<li><a href="#makecol16">makecol16</a> &mdash; Converts an RGB value into a display dependent pixel format.
<li><a href="#makecol16_dither">makecol16_dither</a> &mdash; Calculates a dithered 15 or 16-bit RGB value.
<li><a href="#makecol24">makecol24</a> &mdash; Converts an RGB value into a display dependent pixel format.
<li><a href="#makecol32">makecol32</a> &mdash; Converts an RGB value into a display dependent pixel format.
<li><a href="#makecol8">makecol8</a> &mdash; Converts an RGB value into a display dependent pixel format.
<li><a href="#makecol_depth">makecol_depth</a> &mdash; Converts an RGB value into the specified pixel format.
<li><a href="#MASK_COLOR_15">MASK_COLOR_15</a> &mdash; Constant representing the mask value in sprites.
<li><a href="#MASK_COLOR_16">MASK_COLOR_16</a> &mdash; Constant representing the mask value in sprites.
<li><a href="#MASK_COLOR_24">MASK_COLOR_24</a> &mdash; Constant representing the mask value in sprites.
<li><a href="#MASK_COLOR_32">MASK_COLOR_32</a> &mdash; Constant representing the mask value in sprites.
<li><a href="#MASK_COLOR_8">MASK_COLOR_8</a> &mdash; Constant representing the mask value in sprites.
<li><a href="#palette_color">palette_color</a> &mdash; Maps palette indexes into the current pixel format colors.
</ul>

<p>
In a truecolor video mode the red, green, and blue components for each pixel 
are packed directly into the color value, rather than using a palette lookup 
table. In a 15-bit mode there are 5 bits for each color, in 16-bit modes 
there are 5 bits each of red and blue and six bits of green, and both 24 and 
32-bit modes use 8 bits for each color (the 32-bit pixels simply have an 
extra padding byte to align the data nicely). The layout of these components 
can vary depending on your hardware, but will generally either be RGB or 
BGR. Since the layout is not known until you select the video mode you will 
be using, you must call set_gfx_mode() before using any of the following 
routines!

<p><br>
<div class="al-api"><b>int <a name="makecol8">makecol8</a>(int r, int g, int b);</b></div><br>
<div class="al-api-cont"><b>int <a name="makecol15">makecol15</a>(int r, int g, int b);</b></div><br>
<div class="al-api-cont"><b>int <a name="makecol16">makecol16</a>(int r, int g, int b);</b></div><br>
<div class="al-api-cont"><b>int <a name="makecol24">makecol24</a>(int r, int g, int b);</b></div><br>
<div class="al-api-cont"><b>int <a name="makecol32">makecol32</a>(int r, int g, int b);</b></div><br>
   These functions convert colors from a hardware independent form (red, 
   green, and blue values ranging 0-255) into various display dependent 
   pixel formats. Converting to 15, 16, 24, or 32-bit formats only takes a 
   few shifts, so it is fairly efficient. Converting to an 8-bit color 
   involves searching the palette to find the closest match, which is quite 
   slow unless you have set up an RGB mapping table (see below). Example:
<blockquote class="code"><pre>
      /* 16 bit color version of green. */
      int green_color = <a href="#makecol16" class="autotype" title="Converts an RGB value into a display dependent pixel format.">makecol16</a>(0, 255, 0);</pre></blockquote>
<p><b>Return value:</b>
   Returns the requested RGB triplet in the specified color depth.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="#makeacol32" title="Converts an RGBA color into a 32-bit display pixel format.">makeacol32</a>,
<a class="xref" href="#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="#makecol_depth" title="Converts an RGB value into the specified pixel format.">makecol_depth</a>,
<a class="xref" href="#makecol15_dither" title="Calculates a dithered 15 or 16-bit RGB value.">makecol15_dither</a>,
<a class="xref" href="alleg021.html#rgb_map" title="Look up table to speed up reducing RGB values to palette colors.">rgb_map</a>,
<a class="xref" href="alleg021.html#bestfit_color" title="Finds a palette color fitting the requested RGB values.">bestfit_color</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>.</blockquote>

<blockquote class="eref"><em><b>Examples using this:</b></em>
<a class="eref" href="alleg045.html#exrgbhsv" title="RGB <-> HSV color space conversions.">exrgbhsv</a>.</blockquote>
<div class="al-api"><b>int <a name="makeacol32">makeacol32</a>(int r, int g, int b, int a);</b></div><br>
   Converts an RGBA color into a 32-bit display pixel format, which includes 
   an alpha (transparency) value. There are no versions of this routine for 
   other color depths, because only the 32-bit format has enough room to 
   store a proper alpha channel. You should only use RGBA format colors as 
   the input to draw_trans_sprite() or draw_trans_rle_sprite() after calling 
   set_alpha_blender(), rather than drawing them directly to the screen.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="#makeacol" title="Converts RGBA colors into display dependent pixel formats.">makeacol</a>,
<a class="xref" href="alleg020.html#set_alpha_blender" title="Enables a special alpha-channel blending mode.">set_alpha_blender</a>,
<a class="xref" href="alleg020.html#set_write_alpha_blender" title="Enables the special alpha-channel editing mode.">set_write_alpha_blender</a>.</blockquote>
<div class="al-api"><b>int <a name="makecol">makecol</a>(int r, int g, int b);</b></div><br>
   Converts colors from a hardware independent format (red, green, and blue 
   values ranging 0-255) to the pixel format required by the current video 
   mode, calling the preceding 8, 15, 16, 24, or 32-bit makecol functions as 
   appropriate. Example:
<blockquote class="code"><pre>
      /* Regardless of color depth, this will look green. */
      int green_color = <a href="#makecol" class="autotype" title="Converts an RGB value into the current pixel format.">makecol</a>(0, 255, 0);</pre></blockquote>
<p><b>Return value:</b>
   Returns the requested RGB triplet in the current color depth.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="#makeacol" title="Converts RGBA colors into display dependent pixel formats.">makeacol</a>,
<a class="xref" href="#makecol8" title="Converts an RGB value into a display dependent pixel format.">makecol8</a>,
<a class="xref" href="#makecol_depth" title="Converts an RGB value into the specified pixel format.">makecol_depth</a>,
<a class="xref" href="#makecol15_dither" title="Calculates a dithered 15 or 16-bit RGB value.">makecol15_dither</a>,
<a class="xref" href="alleg021.html#rgb_map" title="Look up table to speed up reducing RGB values to palette colors.">rgb_map</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>.</blockquote>

<blockquote class="eref"><em><b>Examples using this:</b></em>
<a class="eref" href="alleg045.html#Available Allegro examples" title="">Available Allegro examples</a>.</blockquote>
<div class="al-api"><b>int <a name="makecol_depth">makecol_depth</a>(int color_depth, int r, int g, int b);</b></div><br>
   Converts colors from a hardware independent format (red, green, and blue 
   values ranging 0-255) to the pixel format required by the specified color 
   depth. Example:
<blockquote class="code"><pre>
      /* Compose the green color for 15 bit color depth. */
      int green_15bit = <a href="#makecol_depth" class="autotype" title="Converts an RGB value into the specified pixel format.">makecol_depth</a>(15, 0, 255, 0);</pre></blockquote>
<p><b>Return value:</b>
   Returns the requested RGB triplet in the specified color depth.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="#makeacol" title="Converts RGBA colors into display dependent pixel formats.">makeacol</a>,
<a class="xref" href="#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="#makecol8" title="Converts an RGB value into a display dependent pixel format.">makecol8</a>,
<a class="xref" href="#makecol15_dither" title="Calculates a dithered 15 or 16-bit RGB value.">makecol15_dither</a>,
<a class="xref" href="alleg021.html#rgb_map" title="Look up table to speed up reducing RGB values to palette colors.">rgb_map</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>.</blockquote>
<div class="al-api"><b>int <a name="makeacol">makeacol</a>(int r, int g, int b, int a);</b></div><br>
<div class="al-api-cont"><b>int <a name="makeacol_depth">makeacol_depth</a>(int color_depth, int r, int g, int b, int a);</b></div><br>
   Convert RGBA colors into display dependent pixel formats. In anything 
   less than a 32-bit mode, these are the same as calling makecol() or 
   makecol_depth(), but by using these routines it is possible to create 
   32-bit color values that contain a true 8 bit alpha channel along with 
   the red, green, and blue components. You should only use RGBA format 
   colors as the input to draw_trans_sprite() or draw_trans_rle_sprite() 
   after calling set_alpha_blender(), rather than drawing them directly to 
   the screen.
<p><b>Return value:</b>
   Returns the requested RGBA quadruplet.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="#makecol_depth" title="Converts an RGB value into the specified pixel format.">makecol_depth</a>,
<a class="xref" href="alleg020.html#set_alpha_blender" title="Enables a special alpha-channel blending mode.">set_alpha_blender</a>,
<a class="xref" href="alleg020.html#set_write_alpha_blender" title="Enables the special alpha-channel editing mode.">set_write_alpha_blender</a>.</blockquote>

<blockquote class="eref"><em><b>Examples using this:</b></em>
<a class="eref" href="alleg045.html#exrotscl" title="Demonstrates rotate_scaled_sprite functions.">exrotscl</a>.</blockquote>
<div class="al-api"><b>int <a name="makecol15_dither">makecol15_dither</a>(int r, int g, int b, int x, int y);</b></div><br>
<div class="al-api-cont"><b>int <a name="makecol16_dither">makecol16_dither</a>(int r, int g, int b, int x, int y);</b></div><br>
   Given both a color value and a pixel coordinate, calculate a dithered 15 
   or 16-bit RGB value. This can produce better results when reducing images 
   from truecolor to hicolor. In addition to calling these functions 
   directly, hicolor dithering can be automatically enabled when loading 
   graphics by calling the set_color_conversion() function, for example 
   set_color_conversion(COLORCONV_REDUCE_TRUE_TO_HI | COLORCONV_DITHER).
   
<p>
   Example:
<blockquote class="code"><pre>
      int pixel1, pixel2;

      /* The following two color values MAY be different. */
      pixel1 = <a href="#makecol16_dither" class="autotype" title="Calculates a dithered 15 or 16-bit RGB value.">makecol16_dither</a>(255, 192, 64, 0, 0);
      pixel2 = <a href="#makecol16_dither" class="autotype" title="Calculates a dithered 15 or 16-bit RGB value.">makecol16_dither</a>(255, 192, 64, 1, 0);</pre></blockquote>
<p><b>Return value:</b>
   Returns the RGB value dithered for the specified coordinate.


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="#makecol8" title="Converts an RGB value into a display dependent pixel format.">makecol8</a>,
<a class="xref" href="alleg010.html#set_color_conversion" title="Tells Allegro how to convert images during loading time.">set_color_conversion</a>.</blockquote>
<div class="al-api"><b>int <a name="getr8">getr8</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getg8">getg8</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getb8">getb8</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getr15">getr15</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getg15">getg15</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getb15">getb15</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getr16">getr16</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getg16">getg16</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getb16">getb16</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getr24">getr24</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getg24">getg24</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getb24">getb24</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getr32">getr32</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getg32">getg32</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getb32">getb32</a>(int c);</b></div><br>
   Given a color in a display dependent format, these functions extract one 
   of the red, green, or blue components (ranging 0-255). Example:
<blockquote class="code"><pre>
      int r, g, b, color_value;

      color_value = <a href="alleg013.html#_getpixel15" class="autotype" title="Faster specific version of getpixel().">_getpixel15</a>(<a href="alleg009.html#screen" class="autotype" title="Global pointer to the screen hardware video memory.">screen</a>, 100, 100);
      r = <a href="#getr15" class="autotype" title="Extract a color component from the specified pixel format.">getr15</a>(color_value);
      g = <a href="#getg15" class="autotype" title="Extract a color component from the specified pixel format.">getg15</a>(color_value);
      b = <a href="#getb15" class="autotype" title="Extract a color component from the specified pixel format.">getb15</a>(color_value);</pre></blockquote>


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="#geta32" title="Extract the alpha component form a 32-bit pixel format color.">geta32</a>,
<a class="xref" href="#getr" title="Extract a color component from the current pixel format.">getr</a>,
<a class="xref" href="#getr_depth" title="Extract a color component from a color in a specified pixel format.">getr_depth</a>,
<a class="xref" href="#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>.</blockquote>
<div class="al-api"><b>int <a name="geta32">geta32</a>(int c);</b></div><br>
   Given a color in a 32-bit pixel format, this function extracts the alpha 
   component (ranging 0-255).


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="#getr8" title="Extract a color component from the specified pixel format.">getr8</a>.</blockquote>
<div class="al-api"><b>int <a name="getr">getr</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getg">getg</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getb">getb</a>(int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="geta">geta</a>(int c);</b></div><br>
   Given a color in the format being used by the current video mode, these 
   functions extract one of the red, green, blue, or alpha components 
   (ranging 0-255), calling the preceding 8, 15, 16, 24, or 32-bit get 
   functions as appropriate. The alpha part is only meaningful for 32-bit 
   pixels. Example:
<blockquote class="code"><pre>
      int r, g, b, color_value;

      color_value = <a href="alleg013.html#getpixel" class="autotype" title="Reads a pixel from a bitmap.">getpixel</a>(<a href="alleg009.html#screen" class="autotype" title="Global pointer to the screen hardware video memory.">screen</a>, 100, 100);
      r = <a href="#getr" class="autotype" title="Extract a color component from the current pixel format.">getr</a>(color_value);
      g = <a href="#getg" class="autotype" title="Extract a color component from the current pixel format.">getg</a>(color_value);
      b = <a href="#getb" class="autotype" title="Extract a color component from the current pixel format.">getb</a>(color_value);</pre></blockquote>


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="#getr8" title="Extract a color component from the specified pixel format.">getr8</a>,
<a class="xref" href="#getr_depth" title="Extract a color component from a color in a specified pixel format.">getr_depth</a>,
<a class="xref" href="#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>.</blockquote>

<blockquote class="eref"><em><b>Examples using this:</b></em>
<a class="eref" href="alleg045.html#exalpha" title="Creating and using 32 bit RGBA sprites.">exalpha</a>.</blockquote>
<div class="al-api"><b>int <a name="getr_depth">getr_depth</a>(int color_depth, int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getg_depth">getg_depth</a>(int color_depth, int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="getb_depth">getb_depth</a>(int color_depth, int c);</b></div><br>
<div class="al-api-cont"><b>int <a name="geta_depth">geta_depth</a>(int color_depth, int c);</b></div><br>
   Given a color in the format being used by the specified color depth, 
   these functions extract one of the red, green, blue, or alpha components 
   (ranging 0-255). The alpha part is only meaningful for 32-bit pixels.
   Example:
<blockquote class="code"><pre>
      int r, g, b, color_value, bpp;

      bpp = <a href="alleg009.html#bitmap_color_depth" class="autotype" title="Returns the color depth of the specified bitmap.">bitmap_color_depth</a>(bitmap);
      color_value = <a href="alleg013.html#getpixel" class="autotype" title="Reads a pixel from a bitmap.">getpixel</a>(bitmap, 100, 100);
      r = <a href="#getr_depth" class="autotype" title="Extract a color component from a color in a specified pixel format.">getr_depth</a>(bpp, color_value);
      g = <a href="#getg_depth" class="autotype" title="Extract a color component from a color in a specified pixel format.">getg_depth</a>(bpp, color_value);
      b = <a href="#getb_depth" class="autotype" title="Extract a color component from a color in a specified pixel format.">getb_depth</a>(bpp, color_value);</pre></blockquote>
      

<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="#getr" title="Extract a color component from the current pixel format.">getr</a>,
<a class="xref" href="#getr8" title="Extract a color component from the specified pixel format.">getr8</a>,
<a class="xref" href="#geta32" title="Extract the alpha component form a 32-bit pixel format color.">geta32</a>,
<a class="xref" href="#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>.</blockquote>

<blockquote class="eref"><em><b>Examples using this:</b></em>
<a class="eref" href="alleg045.html#exlights" title="One way to do colored lighting effects in a hicolor video mode.">exlights</a>.</blockquote>
<div class="al-api"><b>extern int <a name="palette_color">palette_color</a>[256];</b></div><br>
   Table mapping palette index colors (0-255) into whatever pixel format is 
   being used by the current display mode. In a 256-color mode this just 
   maps onto the array index. In truecolor modes it looks up the specified 
   entry in the current palette, and converts that RGB value into the 
   appropriate packed pixel format. Example:
<blockquote class="code"><pre>
      <a href="alleg008.html#set_color_depth" class="autotype" title="Sets the global pixel color depth.">set_color_depth</a>(32);
      ...
      <a href="alleg011.html#set_palette" class="autotype" title="Sets the entire palette of 256 colors.">set_palette</a>(<a href="alleg011.html#desktop_palette" class="autotype" title="The palette used by the Atari ST low resolution desktop.">desktop_palette</a>);
      /* Put a pixel with the color 2 (green) of the palette */
      <a href="alleg013.html#putpixel" class="autotype" title="Writes a pixel into a bitmap.">putpixel</a>(<a href="alleg009.html#screen" class="autotype" title="Global pointer to the screen hardware video memory.">screen</a>, 100, 100, <a href="#palette_color" class="autotype" title="Maps palette indexes into the current pixel format colors.">palette_color</a>[2]);</pre></blockquote>


<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg011.html#set_palette" title="Sets the entire palette of 256 colors.">set_palette</a>,
<a class="xref" href="#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg008.html#set_color_depth" title="Sets the global pixel color depth.">set_color_depth</a>.</blockquote>

<blockquote class="eref"><em><b>Examples using this:</b></em>
<a class="eref" href="alleg045.html#Available Allegro examples" title="">Available Allegro examples</a>.</blockquote>
<div class="al-api"><b>#define <a name="MASK_COLOR_8">MASK_COLOR_8</a> 0</b></div><br>
<div class="al-api-cont"><b>#define <a name="MASK_COLOR_15">MASK_COLOR_15</a> (5.5.5 pink)</b></div><br>
<div class="al-api-cont"><b>#define <a name="MASK_COLOR_16">MASK_COLOR_16</a> (5.6.5 pink)</b></div><br>
<div class="al-api-cont"><b>#define <a name="MASK_COLOR_24">MASK_COLOR_24</a> (8.8.8 pink)</b></div><br>
<div class="al-api-cont"><b>#define <a name="MASK_COLOR_32">MASK_COLOR_32</a> (8.8.8 pink)</b></div><br>
   Constants representing the colors used to mask transparent sprite pixels 
   for each color depth. In 256-color resolutions this is zero, and in 
   truecolor modes it is bright pink (maximum red and blue, zero green).




<blockquote class="xref"><em><b>See also:</b></em>
<a class="xref" href="alleg009.html#bitmap_mask_color" title="Returns the mask color of the specified bitmap.">bitmap_mask_color</a>,
<a class="xref" href="#makecol" title="Converts an RGB value into the current pixel format.">makecol</a>,
<a class="xref" href="alleg014.html#draw_sprite" title="Draws a copy of the sprite onto the destination bitmap.">draw_sprite</a>,
<a class="xref" href="alleg014.html#masked_blit" title="Copies a rectangle skipping pixels with the mask color.">masked_blit</a>.</blockquote>
<hr><div class="al-back-to-contents"><a href="allegro.html">Back to contents</a></div>

</body>
</html>