drm_rect_translate(9)
π drm_rect_translate β like, the kernel API manual page for it, bestie
okay so this is drm_rect_translate, straight out of the kernel API manual, and honestly? it's giving "tiny function, big main character energy" β¨ it does exactly one thing and it does it slayfully. let's get into it π
β¨ NAME β¨
drm_rect_translate β translate the rectangle π¦ (yes, that's it, that's the whole name section, she's concise)
πΈ SYNOPSIS πΈ
void drm_rect_translate (struct drm_rect *r , int dx , int dy );
that's the whole signature, no notes, no cap π₯
π ARGUMENTS π
rβ the rectangle you wanna translate, bestie. this is the one getting moved π«Άdxβ the horizontal translation. how far left/right it scoots πdyβ the vertical translation. how far up/down it scoots β
π§ DESCRIPTION π§
Move rectangle r by dx in the horizontal direction, and by dy in the vertical direction. literally that's the whole vibe β one nudge sideways, one nudge up-and-down, and your rectangle is living its best new life π
β¨
π SEE ALSO π
if you're obsessed (and you should be), there's a whole friend group of rect utils chilling in the kernel file ./include/drm/drm_rect.h β go say hi π
- 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_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)drm_rect_overlap(9)
ok that's the whole page bestie, no drama, no bugs, no scary caveats β just a rectangle going places ππ
huge shoutout to the <pink>./include/drm</pink> gang for shipping this, dated October 2026 in the kernel API manual β mwah, iconic, periodt πβ¨π«Ά
π¦ 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