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)
- Allegro color bitmap
- Speed of clearing a working area on a bitmap
- git format-patch: troubles with white space trailing
- Mixing bitmaps
- Help with blender and alpha masking
- Allegro 4 and 5 and indexed colors
- Flashing word + waiting for a key to be pressed
- Thinking about upgrading my GPU
Other recent discussions:
- Tint bitmap
- 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
- bitmap transparency