al_set_clipping_rectangle(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ al_set_clipping_rectangle ✨

okay bestie, so this one lives in the allegro5 manual β€” specifically the Allegro 5 API section β€” and it's lowkey one of those functions that sounds boring until you realize it's literally the thing deciding which pixels get to exist πŸ’…


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

void al_set_clipping_rectangle(int x, int y, int width, int height)

πŸŽ€ DESCRIPTION πŸŽ€

so what it does: it sets the region of the target bitmap or display that pixels get clipped to. Like, anything you draw outside that rectangle just... doesn't show up. gone. not invited to the party πŸ™ˆ

and the default? the default is to clip pixels to the entire bitmap. so out of the box nothing's getting cut off β€” you have to actively choose to fence things in. no cap.


πŸ¦‹ SEE ALSO πŸ¦‹


fr fr this is from the Allegro reference manual, al_set_clipping_rectangle(3alleg5) β€” the iconic source doc for the Allegro 5 API. periodt πŸ’–πŸ«Ά
πŸ“¦ where this page comes from