sdlGetSurfaceAlphaMod function surface

bool sdlGetSurfaceAlphaMod(
  1. Pointer<SdlSurface> surface,
  2. Pointer<Uint8> alpha
)

Get the additional alpha value used in blit operations.

\param surface the SDL_Surface structure to query. \param alpha a pointer filled in with the current alpha value. \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.2.0.

\sa SDL_GetSurfaceColorMod \sa SDL_SetSurfaceAlphaMod

extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha)

Implementation

bool sdlGetSurfaceAlphaMod(Pointer<SdlSurface> surface, Pointer<Uint8> alpha) {
  final sdlGetSurfaceAlphaModLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlSurface> surface, Pointer<Uint8> alpha),
        int Function(Pointer<SdlSurface> surface, Pointer<Uint8> alpha)
      >('SDL_GetSurfaceAlphaMod');
  return sdlGetSurfaceAlphaModLookupFunction(surface, alpha) == 1;
}