al_clone_bitmap(3alleg5)
π al_clone_bitmap π
okay bestie, so this is a page from the Allegro 5 API reference manual, and we're gonna talk about the girlboss move that is cloning a bitmap. no cap, it's giving "copy my whole fit but in a new body." β¨
β¨ NAME β¨
al_clone_bitmap β she's part of the Allegro 5 API, and she makes a whole new bitmap that's a copy of an old one. iconic behavior honestly π
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
ALLEGRO_BITMAP *al_clone_bitmap(ALLEGRO_BITMAP *bitmap)
like, you hand her a bitmap pointer and she hands you back a fresh ALLEGRO_BITMAP *. simple. clean. slay. π
π¦ DESCRIPTION π¦
So what's actually happening here? al_clone_bitmap creates a brand new bitmap using al_create_bitmap(3alleg5), and then copies all the pixel data from the old bitmap across. boom, twin. π―
Here's the tea though, and this part matters, no cap: the newly created bitmap gets made with the current new bitmap flags β not the ones that were used to create the original bitmap. so if you changed your new bitmap flags since you made the original, your clone is gonna reflect those, not the originals. vibe check passed but stay aware bestie. π
And one more lil detail: if the new bitmap is a memory bitmap, its projection bitmap gets reset to be orthographic. lowkey important, highkey useful. π
π SEE ALSO π
al_create_bitmap(3alleg5)β the one who actually builds the new bitmap, the main character of this whole operation π«al_set_new_bitmap_format(3alleg5)β set the format for new bitmaps, iykykal_set_new_bitmap_flags(3alleg5)β the flags that your clone is gonna inherit, so choose wisely bestie πal_convert_bitmap(3alleg5)β when you need to change a bitmap's whole vibe π¦
and that's the whole page fr fr. this was the Allegro reference manual talking about al_clone_bitmap(3alleg5) β go forth and clone responsibly, you absolute legend. periodt. πβ¨π«Ά
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms