is_inside_bitmap(3)
β¨ is_inside_bitmap β¨
okay bestie, welcome to the is_inside_bitmap page from the Allegro manual β yes, the Allegro game programming library, we're being β¨retroβ¨ today and honestly? iconic of us. π
πΈ NAME πΈ
is_inside_bitmap β tells you if a point is inside a bitmap. that's it, that's the whole job, and she does it flawlessly. π
π¦ SYNOPSIS π¦
#include <allegro.h>
int is_inside_bitmap(BITMAP *bmp, int x, int y, int clip);
look at her. four args, one int back. no drama, no notes. π«Ά
π DESCRIPTION π
so here's the tea: this function returns non-zero if the point (x, y) lies inside the bitmap. that's the vibe check you're running. π«
but here's where it gets spicy, because that little clip argument is doing SO much work:
- If
clipis non-zero, the function compares the coordinates with the clipping rectangle. so basically it returns non-zero if the point lies inside the clipping rectangle β OR if clipping is disabled for the bitmap entirely (she's generous like that π ). - If
clipis zero, the function compares the coordinates with the actual dimensions</c> of the bitmap. no clipping rectangle involvement, just the raw real geometry, fr fr.
so likeβ¦ same function, two whole personalities, depending on whether you pass a 0 or not. main character energy honestly. π
π SEE ALSO π
go be nosy, bestie, these are all in the same friend group:
and that's the whole page, bestie!! π¦ this little legend comes to you courtesy of Allegro, version 4.4.3 β written by the Allegro people, she's been holding down bitmaps since forever, and we love her for it. periodt. πβ¨π
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms