TICKIT_RECTSET_RECTS(3)

πŸ’– TICKIT_RECTSET_RECTS β€” bestie edition πŸ’–

okay so this is part of the tickit library's manual, section 3 (library functions). it's all about pulling the actual rectangular regions back out of a rectangle set. yes queen, we're doing extraction. πŸŽ€


✨ NAME ✨

tickit_rectset_rects, tickit_rectset_get_rects β€” obtain the regions from a rectangle set

like, the whole point is getting the rectangles out of the rect set. that's the gig. πŸ’…


🌸 SYNOPSIS 🌸

#include <tickit.h>

size_t tickit_rectset_rects(const TickitRectSet *trs);
size_t tickit_rectset_get_rect(const TickitRectSet *trs,
    size_t i, TickitRect *rect);
size_t tickit_rectset_get_rects(const TickitRectSet *trs,
    TickitRect rects[], size_t n);

Link with -ltickit.
⚠️ do NOT forget the Link with -ltickit. bestie, she's not optional ⚠️

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, function by function. πŸ“

tickit_rectset_rects() literally just hands you back the number of rectangular regions stored by the rectangle set. that's it. that's the whole function. she's a count girlie.

tickit_rectset_get_rect() copies the region representing the rectangle at index i into the variable pointed to by rect, and returns 1. iconic behavior honestly. but β€” and this is the important part β€” if i is an invalid index for this set, then 0 is returned instead. no rectangle for you, bestie. πŸ’€

tickit_rectset_get_rects() copies at most n regions into the array given by rects, and returns the number of regions it actually copied. and yes, that number may be fewer than the total stored, if the array you gave her was of insufficient size. she's doing her best with what you gave her. 🫢


⭐ RETURN VALUE ⭐

  • tickit_rectset_rects() returns an integer giving the number of stored regions. πŸ“Š
  • tickit_rectset_get_rect() and tickit_rectset_get_rects() return the number of regions copied. πŸ“¦

like yes they're all returning counts, that's the vibe. periodt. πŸ‘‘


🌈 SEE ALSO 🌈

go read those too, iykyk. no cap. 🧚


✨ that's the whole page bestie, you ate it ✨

this lil manual page came out of the Library Functions Manual (that's the source, and also literally the same title stamped at the top, TICKIT_RECTSET_RECTS(3), twice, like a matching set πŸ’…) β€” love that for her. no version or date was given in the footer, so we're just gonna say: served fresh, undated, and still iconic. mwah. πŸŽ€πŸ’–