drm_rect_intersect(9)
β¨ drm_rect_intersect(9) β¨
okay so bestie, this is a page from the Kernel API Manual and it's literally just about squishing two rectangles together to see where they overlap π like venn diagram energy but for the kernel, no cap
πΈ NAME πΈ
drm_rect_intersect β intersect two rectangles π«Ά
π SYNOPSIS π
bool drm_rect_intersect (struct drm_rect *r1 , const struct drm_rect *r2
);
π ARGUMENTS π
r1β first rectangle, she's the main character here fr fr (and she's about to get rewritten, spoiler)r2β second rectangle, the const one, she stays exactly as she is πΈ
π¦ DESCRIPTION π¦
So the whole vibe is: calculate the intersection of rectangles r1 and r2. That's it. That's the tea β
The way that r1 gets overwritten with the intersection β like, not me just casually replacing your rectangle with the overlap, but that is literally the whole function, iykyk π
π₯ RETURN π₯
true if rectangle r1 is still visible after the operation, false otherwise.
so like... if there's still something there to look at, she says true π if the rectangles missed each other entirely and r1 got absolutely ate by the intersection, she says false π vibe check failed, nothing left to see
β SEE ALSO β
kernel file ./drivers/gpu/drm/drm_rect.c β like, the actual file, go read it bestie π§
drm_rect_clip_scaled(9)drm_rect_calc_hscale(9)drm_rect_calc_vscale(9)drm_rect_debug_print(9)drm_rect_rotate(9)drm_rect_rotate_inv(9)
π bestie this is genuinely iconic: the rectangles intersect,r1becomes the overlap, and ifr1is still visible you gettrueback. that's the entire personality. periodt.
and that's a wrap on the page from ./drivers/gpu/drm, dated October 2026, signed drm_rect_intersect(9) β slay, go intersect some rectangles π
β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms