1al_draw_tinted_bitmap(3) al_draw_tinted_bitmap(3)
2
3
4
6 al_draw_tinted_bitmap - Allegro 5 API
7
9 #include <allegro5/allegro.h>
10
11 void al_draw_tinted_bitmap(ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR tint,
12 float dx, float dy, int flags)
13
15 Like al_draw_bitmap(3) but multiplies all colors in the bitmap with the
16 given color. For example:
17
18 al_draw_tinted_bitmap(bitmap, al_map_rgba_f(0.5, 0.5, 0.5, 0.5), x, y, 0);
19
20 The above will draw the bitmap 50% transparently (r/g/b values need to
21 be pre-multiplied with the alpha component with the default blend
22 mode).
23
24 al_draw_tinted_bitmap(bitmap, al_map_rgba_f(1, 0, 0, 1), x, y, 0);
25
26 The above will only draw the red component of the bitmap.
27
28 See al_draw_bitmap(3) for a note on restrictions on which bitmaps can
29 be drawn where.
30
32 al_draw_bitmap(3)
33
34
35
36Allegro reference manual al_draw_tinted_bitmap(3)