getOpacity method

double? getOpacity()

Get the opacity of a window.

If transparency isn't supported on this platform, opacity will be returned as 1.0f without error.

\param window the window to get the current opacity value from. \returns the opacity, (0.0f - transparent, 1.0f - opaque), or -1.0f on failure; call SDL_GetError() for more information.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.1.3.

\sa SDL_SetWindowOpacity

extern SDL_DECLSPEC float SDLCALL SDL_GetWindowOpacity(SDL_Window *window)

Implementation

double? getOpacity() {
  return sdlGetWindowOpacity(this);
}