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.

\since This function is available since SDL 3.1.3.

\sa SDL_GetSurfaceColorMod \sa SDL_SetSurfaceAlphaMod

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

Implementation

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