al_draw_bitmap(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’– 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

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