is_inside_bitmap(3alleg4)
π is_inside_bitmap β Allegro manual π
okay bestie, welcome to the is_inside_bitmap page, straight outta the Allegro manual for the Allegro game programming library β¨ this one's short, it's sweet, and it's literally just "is this point in the box or not" π
πΈ NAME πΈ
is_inside_bitmap β tells if a point is inside a bitmap. Allegro game programming library. 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 little args. no drama. π¦
π«Ά DESCRIPTION π«Ά
So the tea is this: is_inside_bitmap returns non-zero if the point (x, y) lies inside the bitmap. that's the vibe check. inside = non-zero, outside = zero, no in-between, no "it's complicated" π
now here's the part where you have to actually pay attention because clip changes everything:
- if
clipis non-zero β the function compares the coordinates with the clipping rectangle. so it returns non-zero if the point lies inside the clipping rectangle, OR if clipping is disabled for the bitmap. yep, either one, both count, slay π - if
clipis zero β the function compares the coordinates with the actual dimensions of the bitmap. the raw bitmap. the real one. no clipping rectangle involved at all, periodt π
so basically you pick which box you're asking about: the clip box or the actual bitmap box. that's the whole personality. obsessed π
π SEE ALSO π
go read those next bestie, they're all in the same friend group fr fr π
okay that's the page!! this was Allegro, version 4.4.3, and this gorgeous little manpage is is_inside_bitmap(3alleg4) β mwah, no notes, go check your points, love u, bye πβ¨ππ¦πΈπ
π¦ 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