1draw_character_ex(3) Allegro manual draw_character_ex(3)
2
3
4
6 draw_character_ex - Draws non transparent pixels of the sprite with a
7 color. Allegro game programming library.
8
10 #include <allegro.h>
11
12
13 void draw_character_ex(BITMAP *bmp, BITMAP *sprite, int x, int y,
14 color, bg);
15
17 Draws a copy of the sprite bitmap onto the destination bitmap at the
18 specified position, drawing transparent pixels in the background color
19 (or skipping them if the background color is -1) and setting all other
20 pixels to the specified color. Transparent pixels are marked by a zero
21 in 256-color modes or bright pink for truecolor data (maximum red and
22 blue, zero green). The sprite must be an 8-bit image, even if the des‐
23 tination is a truecolor bitmap. Example:
24
25 BITMAP *logo;
26 ...
27 /* Draw the logo silhouette in red. */
28 draw_character_ex(screen, logo, SCREEN_W / 2, SCREEN_H / 2,
29 makecol(255, 0, 0), -1);
30
31
33 draw_sprite(3), bitmap_mask_color(3)
34
35
36
37Allegro version 4.2.3 draw_character_ex(3)