al_draw_tinted_bitmap
void al_draw_tinted_bitmap(ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR tint,
float dx, float dy, int flags)
Introduced in 5.0.0
Like al_draw_bitmap but multiplies all colors in the bitmap with the given color. For example:
al_draw_tinted_bitmap(bitmap, al_map_rgba_f(1, 1, 1, 0.5), x, y, 0);The above will draw the bitmap 50% transparently.
al_draw_tinted_bitmap(bitmap, al_map_rgba_f(1, 0, 0, 1), x, y, 0);The above will only draw the red component of the bitmap.
Examples: ex_bitmap_flip, ex_blend2, ex_draw_bitmap, ex_expose, ex_logo, ex_nodisplay, ex_transform
Most helpful discussions:
- al_draw_tinted_bitmap() not working as expected (3)
- Lighting and Allegro 5 (1)
- Why is this code giving me Bitmap Assertion Failure?
- Keyboard Interrupting on Mouse Positions?
- Getting artefact when loading image
- Rotate text with transformations
- How to draw transparency text
- Problem with al_draw_filled_circle()
- Illegal Function Call
- Can't make bitmap tinted
Other recent discussions:
- bitmap transparency
- [A5] Draw a red light on a bitmap
- al_get_backbuffer does not work
- [A5] Blender
- [A5] how to draw with transparency
- Using ALLEGRO_COLOR in Classes
- Getting a bit of a problem with drawing a bitmap
- Transparency examples
- custom bitmap with alpha channel
- Speeding up drawing from a tile atlas.