clear_to_color(3alleg4)
β¨ clear_to_color β¨
okay bestie, so this is a page from the Allegro manual β yes, the Allegro game programming library, the whole <rainbow>clear_to_color(3alleg4)</rainbow> situation π
π NAME π
clear_to_color β literally wipes your bitmap clean and paints it the exact color you asked for π¨ and yeah, it's part of the Allegro game programming library.
π¦ SYNOPSIS π¦
#include <allegro.h>
void clear_to_color(BITMAP *bitmap, int color);
that's it. two args. no drama. periodt β¨
πΈ DESCRIPTION πΈ
so the whole vibe is: it clears the bitmap to the specified color π«Ά like, every pixel in that BITMAP gets replaced with the color you hand it. that's the entire job and it does it flawlessly, no notes π
here's the example, and yes it's iconic:
/* Clear the screen to red. */
clear_to_color(bmp, makecol(255, 0, 0));
not me pointing out thatbmpis theBITMAPandmakecol(255, 0, 0)is the red β that's the color argument being built right there in the call, iykyk π
π SEE ALSO π
clear_bitmap(3alleg4)β the sibling function, go read it too bestiemakecol(3alleg4)β how you actually make the color value you're passing in
okay that's the whole page!! π¦β¨ this came straight out of the Allegro manual, version 4.4.3 β yes, version 4.4.3, no cap β and it's all about clear_to_color(3alleg4). mwah, go clear some bitmaps ππ
πΈ
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms