sdlxGetTextureScaleMode function render

int? sdlxGetTextureScaleMode(
  1. Pointer<SdlTexture> texture
)

Get the scale mode used for texture scale operations.

\param texture the texture to query. \param scaleMode a pointer filled in with the current scale mode. \returns true on success or false 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.2.0.

\sa SDL_SetTextureScaleMode

extern SDL_DECLSPEC bool SDLCALL SDL_GetTextureScaleMode(SDL_Texture *texture, SDL_ScaleMode *scaleMode)

See also:

Implementation

int? sdlxGetTextureScaleMode(Pointer<SdlTexture> texture) => ffi.using((arena) {
  final scaleModePointer = arena<Int32>();

  final bl = sdlGetTextureScaleMode(texture, scaleModePointer);

  if (!bl) {
    return null;
  }

  return scaleModePointer.value;
});