Function SDL_ScaleSurface
pub unsafe extern "C" fn SDL_ScaleSurface(
surface: *mut SDL_Surface,
width: i32,
height: i32,
scaleMode: SDL_ScaleMode,
) -> *mut SDL_Surface
Available on crate feature
dep_sdl3
only.Expand description
Creates a new surface identical to the existing surface, scaled to the desired size.
The returned surface should be freed with SDL_DestroySurface()
.
§Parameters
surface
: the surface to duplicate and scale.width
: the width of the new surface.height
: the height of the new surface.scaleMode
: theSDL_ScaleMode
to be used.
§Return value
Returns a copy of the surface or NULL on failure; call SDL_GetError()
for
more information.
§Availability
This function is available since SDL 3.2.0.