al_draw_tinted_bitmap(3alleg5)
π al_draw_tinted_bitmap π
okay bestie, gather round, because this is one of those Allegro 5 API functions that is lowkey iconic and you're gonna want it in your group chat of go-to calls β¨
πΈ NAME πΈ
al_draw_tinted_bitmap β Allegro 5 API, the tinted-bitmap queen π
π¦ SYNOPSIS π¦
#include <allegro5/allegro.h>
void al_draw_tinted_bitmap(ALLEGRO_BITMAP *bitmap, ALLEGRO_COLOR tint,
float dx, float dy, int flags)
π DESCRIPTION π
So it's giving al_draw_bitmap(3alleg5) energy, but with a glow-up: it multiplies every single color in the bitmap by the color you hand it as the tint. literally a vibe filter for your pixels π
wanna see? here's the receipts:
al_draw_tinted_bitmap(bitmap, al_map_rgba_f(0.5, 0.5, 0.5, 0.5), x, y, 0);
that one right there draws the bitmap 50% transparently π§ (and yes, with the default blend mode the r/g/b values need to be pre-multiplied with the alpha component β that's the tea, don't skip it π).
and then:
al_draw_tinted_bitmap(bitmap, al_map_rgba_f(1, 0, 0, 1), x, y, 0);
this one only draws the red component of the bitmap. just red. nothing else. main character behavior fr fr π₯
π«Ά heads up bestie: go read al_draw_bitmap(3alleg5) for the note on restrictions on which bitmaps can be drawn where. not all bitmaps are invited to every party, iykyk π
π SEE ALSO π
and that's the whole page, no cap β¨ this lil legend lives in the Allegro reference manual, dated al_draw_tinted_bitmap(3alleg5) β go forth and tint slay π ππ
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms