add_clip_rect(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– add_clip_rect(3) πŸ’–

okay bestie, this is a page from the Allegro manual, and we are about to get so cozy with add_clip_rect. it's giving "clip rectangle, but make it intersection." πŸ’…


🌸 NAME 🌸

add_clip_rect β€” intersects a bitmap's clipping rectangle with the given area. Allegro game programming library.

✨ SYNOPSIS ✨

#include <allegro.h>

void add_clip_rect(BITMAP *bitmap, int x1, int y1, int x2, int y2);

πŸ¦‹ DESCRIPTION πŸ¦‹

So, the way that this works is: you hand it a bitmap, and it sets that bitmap's clipping rectangle to the intersection of

  • its current clipping rectangle, and
  • the rectangle described by the four coordinates x1, y1, x2, and y2.

Like, the new clipping rectangle is the overlap of what was already clipping the bitmap and the rectangle you just described. That's it, that's the function. iconic behavior, honestly. ✨

πŸ‘‘ SEE ALSO πŸ‘‘


mwah πŸ’‹ this has been the add_clip_rect(3) page from Allegro version 4.4.3. periodt. πŸ’–

πŸ“¦ where this page comes from