al_reparent_bitmap(3)
π 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