SDL_Rect(3type)
π SDL_Rect β from the SDL3 DATATYPES era of the 3type manual π
okay bestie, sit down, grab a strawberry π, because today we're talking about SDL_Rect and honestly? she's iconic, she's everywhere, she's the little rectangle that runs the whole visual world. no cap.
β¨ NAME β¨
SDL_Rect β it's a rectangle π
and likeβ¦ the origin is at the upper left, and everything is in integers (whole numbers only, no decimals, we don't do fractions in this house π).
πΈ SYNOPSIS πΈ
here's the whole vibe, verbatim, no edits, I would never:
#include <SDL3/SDL_rect.h>
typedef struct SDL_Rect
{
int x, y;
int w, h;
} SDL_Rect;
look at her. four lil ints. x and y are where she is, w and h are how big she is. that's it. that's the whole struct. main character energy with zero drama π«Ά
π¦ AVAILABILITY π¦
she's been serving looks since SDL 3.2.0 β¨ so if you're on anything older, sorry babe, she's not there yet π
π SEE ALSO π
the whole friend group, go say hi, they're all lovely:
SDL_RectEmpty(3)SDL_RectsEqual(3)SDL_HasRectIntersection(3)SDL_GetRectIntersection(3)SDL_GetRectAndLineIntersection(3)SDL_GetRectUnion(3)SDL_GetRectEnclosingPoints(3)
and that's the tea π΅ this lil page came to you from Simple Directmedia Layer, riding the SDL 3.4.18 wave, and it's filed under SDL_Rect(3type) in the SDL3 DATATYPES section, periodt πβ¨ go forth and draw rectangles bestie ππ¦
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms