al_draw_bitmap(3)
π al_draw_bitmap (3) π
okay so real talk, this is a page from the Library Functions Manual, and it's literally the Allegro 5 API, bestie. here we go π«Ά
β¨ NAME
al_draw_bitmap β the Allegro 5 API function that just... puts your bitmap on screen. no drama, no scaling, no spinning. she's simple, she's iconic π
π¦ SYNOPSIS
#include <allegro5/allegro.h>
void al_draw_bitmap(ALLEGRO_BITMAP *bitmap, float dx, float dy, int flags)
yeah that's the whole thing. bitmap goes in, some dx and dy floats, an int flags, and she slays β¨
πΈ DESCRIPTION
so this function draws an unscaled, unrotated bitmap β like, no resizing, no rotating, she's coming out exactly as she is, no cap β at the position you give her, and it goes onto the current target bitmap (that's the al_set_target_bitmap(3) one if you need to look it up π
).
flags can be a combination of these babies:
ALLEGRO_FLIP_HORIZONTALβ flips the bitmap about the y-axis, like a mirror selfie πALLEGRO_FLIP_VERTICALβ flips the bitmap about the x-axis, so she's upside down β¨
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 to another sub-bitmap of its parent) β none of that is currently supported, bestie, it's just not. If you need to copy part of a bitmap into the same bitmap, just use a temporary bitmap instead. lowkey the move π§
Note π: the backbuffer (or a sub-bitmap thereof) can not be transformed, blended or tinted. not a single one. if you need to draw the backbuffer, draw it to a temporary bitmap first with no active transformation (except translation) β otherwise your blending and tinting settings/parameters will just be ignored π. and this does not apply when you're drawing into a memory bitmap, so that's your little loophole π
π SEE ALSO
al_draw_bitmap_region(3)al_draw_scaled_bitmap(3)al_draw_rotated_bitmap(3)al_draw_scaled_rotated_bitmap(3)
like, the whole family. go say hi to the rest of the bitmaps π¦
and that's the whole vibe check, bestie π this was brought to you by the Allegro reference manual, starring al_draw_bitmap(3) herself β no cap, she ate π
π
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms