SDL_COLORSPACECHROMA(3)

πŸ’– SDL_COLORSPACECHROMA πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual πŸŽ€ this one's a tiny lil macro with main character energy β€” it's literally just a way to peek at the chroma sample location hiding inside an SDL_Colorspace. no cap.


✨ NAME ✨

SDL_COLORSPACECHROMA β€” a macro to retrieve the chroma sample location of an SDL_Colorspace. πŸ¦‹


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_pixels.h>

#define SDL_COLORSPACECHROMA(cspace)     (SDL_ChromaLocation)(((cspace) >> 20) & 0x0F)

like. she's a one-liner. a baddie. a macro. πŸ’…


πŸŽ€ MACRO PARAMETERS πŸŽ€

  • cspace β€” an SDL_Colorspace to check. that's it, that's the whole vibe check. 🫢

⭐ RETURN VALUE ⭐

Returns the SDL_ChromaLocation of cspace. periodt. πŸ’–


πŸ”₯ THREAD SAFETY πŸ”₯

It is safe to call this macro from any thread. so go ahead and call her from everywhere, she does not care, she was built for this 🌈


πŸ’œ AVAILABILITY πŸ’œ

This macro is available since SDL 3.2.0. (iykyk, if you're on something older, sorry babe 😭)


that's the whole page bestie, you're so smart for reading it, slay πŸ’…βœ¨

mwah πŸ’‹ this came from Simple Directmedia Layer, SDL 3.4.18, and the page is SDL_COLORSPACECHROMA(3) β€” luv u, bye πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from