TICKIT_RECTSET_ADD(3)

πŸ’– TICKIT_RECTSET_ADD πŸ’–

okay so bestie, welcome to tickit_rectset_add β€” it's in the Library Functions Manual and it's literally the moment your rectangle set gets a brand new area dropped into it. slay.


✨ NAME ✨

tickit_rectset_add β€” add an area to a rectangle set πŸŽ€


🌸 SYNOPSIS 🌸

#include <tickit.h>

void tickit_rectset_add(TickitRectSet *trs, const TickitRect *rect);

Link with -ltickit.


πŸ¦‹ DESCRIPTION πŸ¦‹

so tickit_rectset_add() makes sure the regions your rectangle set is holding on to include the area you passed in as rect. periodt, that's the whole job.

but here's the tea πŸ«– β€” a rectangle set stores a set of non-overlapping regions. so if your new area would be all up in the existing regions' business, it may have to split the newly-added area into smaller pieces so nothing overlaps. it's giving responsible. it's giving boundaries. we love that for it.

and because it also merges neighbours where possible, the vibe check can go the other way too β€” you might end up with fewer regions being stored than before. iconic behaviour honestly.


πŸ’… RETURN VALUE πŸ’…

tickit_rectset_add() returns no value. it just does the thing and leaves. no notes. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘


that's it bestie, go forth and add your rectangles 🫢 from the Library Functions Manual, TICKIT_RECTSET_ADD(3) β€” stay hydrated, link with -ltickit, and remember: no overlap, only vibes ✨🌈