|
Size: 959
Comment: update content - w/ Sam; remove draft
|
← Revision 3 as of 2011-05-17 17:49:38 ⇥
Size: 958
Comment: minor change
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 20: | Line 20: |
| Returns 0 on success, or a negative error code on failure; call [[SDL_GetError]]() for more information. | Returns 0 on success or a negative error code on failure; call [[SDL_GetError]]() for more information. |
SDL_RenderSetViewport
Use this function to set the drawing area for rendering on the current target.
Contents
Syntax
int SDL_RenderSetViewport(SDL_Renderer* renderer,
const SDL_Rect* rect)
Function Parameters
renderer |
the rendering context |
rect |
the SDL_Rect structure representing the drawing area, or NULL to set the viewport to the entire target |
Return Value
Returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
Code Examples
You can add your code example here
Remarks
When the window is resized, the current viewport is automatically centered within the new window size.
