---
name: "extrans"
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/extrans"
---

# extrans(3alleg)

Lighting and translucency effects. Allegro game programming library.

## NAME

extrans - Lighting and translucency effects. Allegro game programming library.

## SYNOPSIS

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

**Example extrans**

## DESCRIPTION

This program demonstrates how to use the lighting and translucency functions. The first part of the example will show a dark screen illuminated by a spotlight you can move with your mouse. After a key press the example shows the full bitmap and the spotlight changes to be a reduced version of the background with 50% of translucency.

The translucency effect is easy to do in all color depths. However, the lighting effect has to be performed in a different way depending on whether the screen is in 8bit mode or another color depth. This is because additive drawing mode uses a different set of routines for truecolor modes.

## SEE ALSO

[**BITMAP**(3alleg)](/BITMAP/3alleg.md), [**COLOR\_MAP**(3alleg)](/COLOR_MAP/3alleg.md), [**END\_OF\_MAIN**(3alleg)](/END_OF_MAIN/3alleg.md), [**PALETTE**(3alleg)](/PALETTE/3alleg.md), [**RGB**(3alleg)](/RGB/3alleg.md), [**RGB\_MAP**(3alleg)](/RGB_MAP/3alleg.md), [**SCREEN\_H**(3alleg)](/SCREEN_H/3alleg.md), [**SCREEN\_W**(3alleg)](/SCREEN_W/3alleg.md), [**allegro\_error**(3alleg)](/allegro_error/3alleg.md), [**allegro\_init**(3alleg)](/allegro_init/3alleg.md), [**allegro\_message**(3alleg)](/allegro_message/3alleg.md), [**bitmap\_color\_depth**(3alleg)](/bitmap_color_depth/3alleg.md), [**blit**(3alleg)](/blit/3alleg.md), [**circlefill**(3alleg)](/circlefill/3alleg.md), [**clear\_bitmap**(3alleg)](/clear_bitmap/3alleg.md), [**clear\_keybuf**(3alleg)](/clear_keybuf/3alleg.md), [**color\_map**(3alleg)](/color_map/3alleg.md), [**create\_bitmap**(3alleg)](/create_bitmap/3alleg.md), [**create\_bitmap\_ex**(3alleg)](/create_bitmap_ex/3alleg.md), [**create\_light\_table**(3alleg)](/create_light_table/3alleg.md), [**create\_rgb\_table**(3alleg)](/create_rgb_table/3alleg.md), [**create\_trans\_table**(3alleg)](/create_trans_table/3alleg.md), [**destroy\_bitmap**(3alleg)](/destroy_bitmap/3alleg.md), [**draw\_trans\_sprite**(3alleg)](/draw_trans_sprite/3alleg.md), [**drawing\_mode**(3alleg)](/drawing_mode/3alleg.md), [**install\_keyboard**(3alleg)](/install_keyboard/3alleg.md), [**install\_mouse**(3alleg)](/install_mouse/3alleg.md), [**install\_timer**(3alleg)](/install_timer/3alleg.md), [**keypressed**(3alleg)](/keypressed/3alleg.md), [**load\_bitmap**(3alleg)](/load_bitmap/3alleg.md), [**mouse\_x**(3alleg)](/mouse_x/3alleg.md), [**mouse\_y**(3alleg)](/mouse_y/3alleg.md), [**poll\_mouse**(3alleg)](/poll_mouse/3alleg.md), [**rectfill**(3alleg)](/rectfill/3alleg.md), [**replace\_filename**(3alleg)](/replace_filename/3alleg.md), [**rest**(3alleg)](/rest/3alleg.md), [**rgb\_map**(3alleg)](/rgb_map/3alleg.md), [**screen**(3alleg)](/screen/3alleg.md), [**set\_alpha\_blender**(3alleg)](/set_alpha_blender/3alleg.md), [**set\_gfx\_mode**(3alleg)](/set_gfx_mode/3alleg.md), [**set\_palette**(3alleg)](/set_palette/3alleg.md), [**set\_trans\_blender**(3alleg)](/set_trans_blender/3alleg.md), [**set\_write\_alpha\_blender**(3alleg)](/set_write_alpha_blender/3alleg.md), [**stretch\_blit**(3alleg)](/stretch_blit/3alleg.md)
