TICKIT_RECT_SUBTRACT(3)
π TICKIT_RECT_SUBTRACT π
okay bestie, this one is from the tickit library, and it's literally just β¨rectangle mathβ¨ β specifically, how to cut a hole out of a rectangle. no cap.
β¨ NAME β¨
tickit_rect_subtract β obtain the difference of two rectangles π¦
β¨ SYNOPSIS β¨
#include <tickit.h>
int tickit_rect_subtract(TickitRect dst[4],
const TickitRect *orig, const TickitRect *hole);
Link with -ltickit. π
β¨ DESCRIPTION β¨
tickit_rect_subtract() initialises the rectangle structures given by dst β and bestie, listen, dst must be an array capable of containing at least four rectangle structures, like that is not optional, that is the vibe β with a set of non-overlapping rectangles covering the same area as the one given by orig without covering hole. π
Depending on the geometry of the given rectangles it will create from zero to four resultant rectangles. she's flexible like that π§
It returns the number of rectangular regions initialised into the result array.
Now for the tea, the actual behaviour cases β:
- If
holecompletely coversorigthen the result will contain no rectangles. rip orig, she's gone π - If they do not intersect then just
origwill be returned. untouched, unbothered, main character energy π - Otherwise, the result will contain non-overlapping horizontal stripes of
origwithouthole. yes queen, stripes β¨
β¨ RETURN VALUE β¨
tickit_rect_subtract() returns the number of rectangles written to dst. that's it, that's the number, periodt π
β¨ SEE ALSO β¨
tickit_rect_init_sized(3)tickit_rect_init_bounded(3)tickit_rect_intersect(3)tickit_rect_add(3)tickit_rect(7)tickit(7)
and that's the whole page, bestie!! π«Ά this was TICKIT_RECT_SUBTRACT(3), from the Library Functions Manual β go forth and subtract your rectangles, ily, bye ππ
π¦ where this page comes from
- alpine 3.24: libtickit-doc 0.4.6-r0 Β· MIT
- debian bookworm: libtickit-dev 0.4.3-1 Β· MIT
- debian trixie: libtickit-dev 0.4.3-2 Β· MIT
- fedora 43: libtickit-devel 0.4.5-2.fc43 Β· MIT
- fedora 43: libtickit-devel 0.4.5-2.fc43 Β· MIT
- fedora 44: libtickit-devel 0.4.5-3.fc44 Β· MIT
- fedora 44: libtickit-devel 0.4.5-3.fc44 Β· MIT
- nixos 26.05: libtickit 0.4.5
- nixpkgs unstable: libtickit 0.4.6
- ubuntu jammy: libtickit-dev 0.4.1-1 Β· MIT
- ubuntu noble: libtickit-dev 0.4.3-1.1build1 Β· MIT
- ubuntu questing: libtickit-dev 0.4.3-2
- ubuntu resolute: libtickit-dev 0.4.3-2build1 Β· MIT
- ubuntu stonking: libtickit-dev 0.4.3-2build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms