al_draw_bitmap(3alleg5)
π al_draw_bitmap β the Allegro 5 API glow-up π
okay bestie, gather round, because we're talking about al_draw_bitmap from the Allegro 5 API and honestly? it's giving foundational. it's giving main character. let's get into it. π¦
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
void al_draw_bitmap(ALLEGRO_BITMAP *bitmap, float dx, float dy, int flags)
πΈ DESCRIPTION πΈ
So what does it do? It draws your bitmap β unscaled and unrotated, no notes β at the position you give it, straight onto the current target bitmap (peep al_set_target_bitmap(3alleg5) if you need the tea on that one). β¨
now the flags situation. flags can be a combination of these two icons:
ALLEGRO_FLIP_HORIZONTALβ flips the bitmap about the y-axis πͺALLEGRO_FLIP_VERTICALβ flips the bitmap about the x-axis π
π Note: the current target bitmap must be a different bitmap. Drawing a bitmap to itself (or to a sub-bitmap of itself), or drawing a sub-bitmap to its parent (or another sub-bitmap of its parent), is not currently supported. like, at all. not me trying to do the impossible π. If you genuinely need to copy part of a bitmap into that same bitmap, just use a temporary bitmap instead. periodt.
π«Ά Note: the backbuffer (or a sub-bitmap of it) can not be transformed, blended, or tinted. so if you need to draw the backbuffer, draw it to a temporary bitmap first, with no active transformation β except translation, that one's fine. any blending and tinting settings/parameters will just be ignored. π This does not apply when you're drawing into a memory bitmap though, so breathe. π
π SEE ALSO π
al_draw_bitmap_region(3alleg5)al_draw_scaled_bitmap(3alleg5)al_draw_rotated_bitmap(3alleg5)al_draw_scaled_rotated_bitmap(3alleg5)
and that's the whole vibe, bestie π
this was the Allegro reference manual, al_draw_bitmap(3alleg5). go forth and draw, you absolute icon πβ
π¦ 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