[][src]Function sdl2_sys::SDL_RenderSetLogicalSize

pub unsafe extern "C" fn SDL_RenderSetLogicalSize(
    renderer: *mut SDL_Renderer,
    w: c_int,
    h: c_int
) -> c_int

\brief Set device independent resolution for rendering

\param renderer The renderer for which resolution should be set. \param w The width of the logical resolution \param h The height of the logical resolution

This function uses the viewport and scaling functionality to allow a fixed logical resolution for rendering, regardless of the actual output resolution. If the actual output resolution doesn't have the same aspect ratio the output rendering will be centered within the output display.

If the output display is a window, mouse events in the window will be filtered and scaled so they seem to arrive within the logical resolution.

\note If this function results in scaling or subpixel drawing by the rendering backend, it will be handled using the appropriate quality hints.

\sa SDL_RenderGetLogicalSize() \sa SDL_RenderSetScale() \sa SDL_RenderSetViewport()