SDL_Rect(3)
β¨ SDL_Rect(3) β¨
okay bestie, welcome to the SDL API Reference π this one's short and sweet, it's literally just a lil rectangle, and yet she's everywhere in SDL. iykyk.
πΈ NAME πΈ
SDL_Rect β defines a rectangular area π
π§ STRUCTURE DEFINITION π§
here's the whole entire girl, no cap:
typedef struct{
Sint16 x, y;
Uint16 w, h;
} SDL_Rect;
look at her. four fields. perfect. iconic. π
π¦ STRUCTURE DATA π¦
x, yβ the position of the upper-left corner of the rectangle π like where does she start, top-left energy, main character origin point.w, hβ the width and height of the rectangle π how big she is, how much room she takes up, periodt.
π DESCRIPTION π
so an SDL_Rect defines a rectangular area of pixels. that's it, that's the vibe β¨
and the way that she's used EVERYWHERE?? she's the one who tells SDL_BlitSurface which blitting regions to work with π«Ά and several other video functions are obsessed with her too. lowkey the backbone of the whole video pipeline, fr fr π
π SEE ALSO π
SDL_BlitSurfaceSDL_UpdateRect
go read those next bestie, they're the ones who actually put her to work π
and that's the whole page!! πΈ this came to you from SDL, dated Tue 11 Sep 2001, 23:01 π ty for reading, mwah, slay, go draw some rectangles π
π¦ where this page comes from
- debian bookworm: libsdl1.2-dev 1.2.15+dfsg2-8 Β· LGPL-2.1-or-later
- nixos 26.05: SDL_sixel 0-unstable-2016-02-06
- nixpkgs unstable: SDL_sixel 0-unstable-2016-02-06
- ubuntu jammy: libsdl1.2-dev 1.2.15+dfsg2-6 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms