getBlendMode method

int? getBlendMode()

Get the blend mode used for blit operations.

\param surface the SDL_Surface structure to query. \param blendMode a pointer filled in with the current SDL_BlendMode. \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_SetSurfaceBlendMode

extern SDL_DECLSPEC bool SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode *blendMode)

Implementation

int? getBlendMode() {
  int? result;
  var blendModePointer = calloc<Uint32>();
  if (sdlGetSurfaceBlendMode(this, blendModePointer) == true) {
    result = blendModePointer.value;
  }
  calloc.free(blendModePointer);
  return result;
}