drm_rect_translate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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