---
name: "draw_trans_rle_sprite"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/draw_trans_rle_sprite"
---

# draw\_trans\_rle\_sprite(3alleg)

Draws a translucent RLE sprite. Allegro game programming library.

## NAME

draw\_trans\_rle\_sprite - Draws a translucent RLE sprite. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void draw\_trans\_rle\_sprite(BITMAP \*bmp, const RLE\_SPRITE \*sprite,** **int x, int y);**

## DESCRIPTION

Translucent version of draw\_rle\_sprite(). See the description of  draw\_trans\_sprite(). This must only be used after you have set up the  color mapping table (for 256-color modes) or blender functions (for  truecolor modes). The bitmap and sprite must normally be in the same  color depth, but as a special case you can draw 32-bit RGBA format  sprites onto any hicolor or truecolor bitmap, as long as you call  set\_alpha\_blender() first. Example:

```
   /* Some one time initialisation code. */
   COLOR_MAP global_trans_table;
   create_trans_table(&global_trans_table, my_palette,
                      128, 128, 128, NULL);
   ...
   if (get_color_depth() == 8)
      color_map = &global_trans_table;
   else
      set_trans_blender(128, 128, 128, 128);
   draw_trans_rle_sprite(buffer, rle_ghost_sprite, x, y);
```

## SEE ALSO

[**draw\_rle\_sprite**(3alleg)](/draw_rle_sprite/3alleg.md), [**draw\_lit\_rle\_sprite**(3alleg)](/draw_lit_rle_sprite/3alleg.md), [**draw\_trans\_sprite**(3alleg)](/draw_trans_sprite/3alleg.md), [**color\_map**(3alleg)](/color_map/3alleg.md), [**set\_trans\_blender**(3alleg)](/set_trans_blender/3alleg.md), [**set\_alpha\_blender**(3alleg)](/set_alpha_blender/3alleg.md), [**bitmap\_mask\_color**(3alleg)](/bitmap_mask_color/3alleg.md)
