drm_rect_translate_to(9)
π drm_rect_translate_to(9) π
okay so this is a page from the Kernel API Manual β yes, the actual kernel docs, and yes, we're gonna make it cute. it's drm_rect_translate_to, and honestly? it's giving "tiny function, big main character energy". let's go bestie β¨
β¨ NAME β¨
drm_rect_translate_to β translate the rectangle to an absolute position π―
like, not relative translation, not "nudge it a bit" β we're putting this rectangle exactly where we say. periodt.
π SYNOPSIS π
void drm_rect_translate_to (struct drm_rect *r , int x , int y );
look at that signature. clean. iconic. no return value, it just does the thing and leaves π
πΈ ARGUMENTS πΈ
rβ the rectangle to be translated π«Ά this is the lil guy we're moving aroundxβ horizontal position β where it's gonna land on the x axisyβ vertical position π¦ where it's gonna land on the y axis
π DESCRIPTION π
Move rectangle r to x in the horizontal direction, and to y in the vertical direction.
that's it. that's the whole vibe. it's not adding, it's not offsetting β it moves r so it sits at x horizontally and y vertically. absolute positioning, no cap π₯
π SEE ALSO π
bestie, the friend group is LARGE and we love them all. these all live in the kernel file ./include/drm/drm_rect.h under 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_downscale(9)drm_rect_width(9)drm_rect_height(9)drm_rect_visible(9)drm_rect_equals(9)drm_rect_fp_to_int(9)drm_rect_overlap(9)
go read them all bestie, they're all in ./include/drm and they all slay in their own way π
ngl this one's short and sweet β but if you're reaching for it, double-check you don't actually want drm_rect_translate(9) instead. that one's the relative-move sibling. this one is absolute. iykyk π
and that's the tea! π source path is ./include/drm, dated October 2026 β so mark your calendars, mwah π π§
π¦ 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