al_draw_tinted_bitmap_region(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

al_draw_tinted_bitmap_region β€” ok so this is the Allegro 5 API function that draws a piece of a bitmap but with a lil color filter on it πŸ’… (yes the manual name is literally "Allegro 5 API", we love a straightforward king)


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

void al_draw_tinted_bitmap_region(ALLEGRO_BITMAP *bitmap,
   ALLEGRO_COLOR tint,
   float sx, float sy, float sw, float sh, float dx, float dy,
   int flags)

πŸ’– DESCRIPTION πŸ’–

So bestie, picture al_draw_bitmap_region(3alleg5) β€” you know her, she draws a region β€” except this version multiplies all colors in the bitmap with the given color. That's it, that's the glow-up. The tint color gets multiplied into every single pixel, no cap. ✨

Also, heads up: go check al_draw_bitmap(3alleg5) for a note on restrictions on which bitmaps can be drawn where. Not me skipping the fine print β€” it's genuinely important, iykyk 🫢

Lowkey read that other page before you go wild with this one. Some bitmaps just can't be drawn everywhere, and that's not a vibe you want to find out about the hard way. 😭

πŸ¦‹ SEE ALSO πŸ¦‹


Allegro reference manual β€” that's the source, and it's giving official Allegro docs energy. This page is the al_draw_tinted_bitmap_region(3alleg5) one, from the Allegro reference manual, dated whenever the manual says it's dated (the footer keeps the real date, I'm just here for the vibes πŸ’–). Slay, go tint some regions, bestie. πŸŽ€πŸŒΈπŸ’…

πŸ“¦ where this page comes from