getAlphaMod method

int? getAlphaMod()

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)

{@category surface}

Implementation

int? getAlphaMod() {
  int? result;
  final alphaPointer = calloc<Uint8>();
  if (sdlGetSurfaceAlphaMod(this, alphaPointer)) {
    result = alphaPointer.value;
  }
  calloc.free(alphaPointer);
  return result;
}