floodfill(3alleg4)

πŸ’– floodfill πŸ’–

okay bestie, welcome to the Allegro manual β€” this one's floodfill(3alleg4), straight out of the Allegro game programming library, and it's literally the "fill bucket" tool from MS Paint but make it ✨C✨. no cap.


🌸 NAME 🌸

floodfill β€” floodfills an enclosed area. she's an Allegro game programming library girlie πŸŽ€


✨ SYNOPSIS ✨

#include <allegro.h>

void floodfill(BITMAP *bmp, int x, int y, int color);

like, that's it. that's the whole vibe. short, sweet, iconic πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea πŸ“: floodfill takes an enclosed area and fills it all in with the color you picked.

where does it start, you ask? at the point (x, y) β€” that's your little seed pixel, your main character, the spot where the spill begins πŸ’…. and it spreads out from there filling the enclosed area with the specified color.

it's giving "paint bucket tool, but I'm a C function and I have no chill." 🌈

fr fr, if your area isn't actually enclosed, that fill is gonna leak everywhere like gossip in a group chat πŸ’€ so maybe double-check your boundaries first, bestie.

πŸ‘€ SEE ALSO πŸ‘€

  • drawing_mode(3alleg4) β€” your go-to for changing up how drawing happens πŸ–ŒοΈ
  • makecol(3alleg4) β€” how you actually cook up that color value in the first place 🎨

and that's the whole page, bestie!! slay πŸ’– this was floodfill from the Allegro manual, version 4.4.3 β€” periodt. go fill something pretty, you absolute icon 🫢✨🌸