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 that bmp is the BITMAP and makecol(255, 0, 0) is the red β€” that's the color argument being built right there in the call, iykyk πŸ’…

πŸŽ€ SEE ALSO πŸŽ€


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 πŸ’–πŸ’…πŸŒΈ