al_reparent_bitmap(3)

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

πŸŽ€ NAME πŸŽ€

okay so this is the manual page for al_reparent_bitmap(3) β€” Allegro 5 API, straight out of the Library Functions Manual. Bestie, it’s a sub-bitmap glow-up situation, and I’m obsessed. πŸ’–

✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

void al_reparent_bitmap(ALLEGRO_BITMAP *bitmap, ALLEGRO_BITMAP *parent,
   int x, int y, int w, int h)

πŸ’– DESCRIPTION πŸ’–

For a sub-bitmap, this changes the parent, position and size. No cap, it’s literally the same as destroying the bitmap and re-creating it with al_create_sub_bitmap(3) β€” except the bitmap pointer stays the same. 🫢

This has so many uses, fr fr:

  • An animation player could return a single bitmap which can just be re-parented to different animation frames without having to re-draw the contents. 🎞️
  • Or a sprite atlas could re-arrange its sprites without having to invalidate all existing bitmaps. 🧚

πŸ¦‹ SEE ALSO πŸ¦‹

🌸 SINCE 🌸

This icon has been in the game since 5.1.12 β€” periodt. πŸ‘‘

source/version + date vibe check: Allegro reference manual, page al_reparent_bitmap(3), SINCE 5.1.12, and no separate date in the footer β€” that’s the cute lil sign-off, bestie 🫢✨

πŸ“¦ 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