[][src]Function sdl2_sys::SDL_RenderSetViewport

pub unsafe extern "C" fn SDL_RenderSetViewport(
    renderer: *mut SDL_Renderer,
    rect: *const SDL_Rect
) -> c_int

\brief Set the drawing area for rendering on the current target.

\param renderer The renderer for which the drawing area should be set. \param rect The rectangle representing the drawing area, or NULL to set the viewport to the entire target.

The x,y of the viewport rect represents the origin for rendering.

\return 0 on success, or -1 on error

\note If the window associated with the renderer is resized, the viewport is automatically reset.

\sa SDL_RenderGetViewport() \sa SDL_RenderSetLogicalSize()