sdlGetSurfaceColorMod function

bool sdlGetSurfaceColorMod(
  1. Pointer<SdlSurface> surface,
  2. Pointer<Uint8> r,
  3. Pointer<Uint8> g,
  4. Pointer<Uint8> b,
)

Get the additional color value multiplied into blit operations.

\param surface the SDL_Surface structure to query. \param r a pointer filled in with the current red color value. \param g a pointer filled in with the current green color value. \param b a pointer filled in with the current blue color value. \returns true on success or false on failure; call SDL_GetError() for more information.

\since This function is available since SDL 3.1.3.

\sa SDL_GetSurfaceAlphaMod \sa SDL_SetSurfaceColorMod

extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b)

Implementation

bool sdlGetSurfaceColorMod(Pointer<SdlSurface> surface, Pointer<Uint8> r,
    Pointer<Uint8> g, Pointer<Uint8> b) {
  final sdlGetSurfaceColorModLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlSurface> surface, Pointer<Uint8> r,
          Pointer<Uint8> g, Pointer<Uint8> b),
      int Function(Pointer<SdlSurface> surface, Pointer<Uint8> r,
          Pointer<Uint8> g, Pointer<Uint8> b)>('SDL_GetSurfaceColorMod');
  return sdlGetSurfaceColorModLookupFunction(surface, r, g, b) == 1;
}