al_draw_bitmap(3alleg5)

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

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


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