drm_rect_overlap(9)
π drm_rect_overlap(9) π
okay bestie, so this is a page from the Kernel API Manual β yes, the actual kernel manual, we're in the big leagues now β and it's about drm_rect_overlap, which is genuinely the most "are we vibing or not" function in all of DRM. it's a little bool-returning icon and honestly it ate. π
β¨ NAME β¨
drm_rect_overlap β check if two rectangles overlap πΈ
like, do these two boxes share space or are they living in their own separate eras? that's the whole function. no cap.
π¦ SYNOPSIS π¦
bool drm_rect_overlap (const struct drm_rect *a , const struct drm_rect *b );
it hands you back a bool. true = they're overlapping, false = they're not. main character energy from a one-line function, we love to see it. π
π ARGUMENTS π
- a β the first rectangle π like, the one you're checking from, yk?
- b β the second rectangle π«Ά the one you're checking against
both are const struct drm_rect * β const because we're respectful, we're not gonna touch your rectangles, we're just gonna look at them. π
β RETURN β
true if the rectangles overlap, false otherwise.
literally that's it. a vibe check that returns a boolean. π₯
π SEE ALSO π
so the actual source of truth lives in the kernel file ./include/drm/drm_rect.h β go drink from the firehose, bestie, it's all there. and while you're at it, meet the whole friend group:
rect utils(9)struct drm_rect(9)DRM_RECT_INIT(9)DRM_RECT_FMT(9)DRM_RECT_ARG(9)DRM_RECT_FP_FMT(9)DRM_RECT_FP_ARG(9)drm_rect_init(9)drm_rect_adjust_size(9)drm_rect_translate(9)drm_rect_translate_to(9)drm_rect_downscale(9)drm_rect_width(9)drm_rect_height(9)drm_rect_visible(9)drm_rect_equals(9)drm_rect_fp_to_int(9)
that's the whole squad and every single one of them is invited to the group chat. π
ngl if you're out here comparing rectangles without at least glancing at drm_rect_equals(9) too, you're lowkey doing the most. just saying. π
okay that's the page!! this one's from ./include/drm, dated October 2026, and it's drm_rect_overlap(9) signing off β mwah, slay, periodt, go check your 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