TICKIT_RECT(7)

okay so bestie, this is TICKIT_RECT(7) from the Miscellaneous Information Manual, and we're diving into TickitRect β€” the utility structure that's literally just a rectangle. no cap. πŸ’…βœ¨

🌸 NAME 🌸

TickitRect β€” a utility structure representing a rectangular region. that's the name, that's the vibe, iconic. πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <tickit.h>

typedef struct {
  int top;
  int left;
  int lines;
  int cols;
} TickitRect;

πŸ’– DESCRIPTION πŸ’–

okay so a TickitRect structure represents a single non-empty rectangular region of the screen. like, it's not empty, bestie, it's got content. ✨

it stores the position of the top left corner of the region, and its size in lines and columns. so you got top, left, lines, and cols β€” the whole squad is assembled. πŸ’…

πŸ‘‘ FUNCTIONS πŸ‘‘

A new TickitRect structure can be initialised using the tickit_rect_init_sized(3) and tickit_rect_init_bounded(3) functions. fresh out the box, fr fr. 🫢

Its bottom right corner can be obtained using tickit_rect_bottom(3) and tickit_rect_right(3). where does it end? these functions know. πŸ”₯

Interactions between rectangles can be tested using the predicate functions tickit_rect_contains(3) and tickit_rect_intersects(3). do they overlap? does one contain the other? the drama is real, and we're here for it. 😭

New rectangles can be created from existing ones using tickit_rect_intersect(3) to form the intersection, tickit_rect_add(3) to form the union sum, and tickit_rect_subtract(3). math but make it cute. πŸ’–


and that's the whole page, bestie. this was TICKIT_RECT(7) from the Miscellaneous Information Manual β€” that's the footer, periodt. the date is MIA, but we're still slaying. πŸ’…βœ¨