Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2011-03-12 19:31:18
Size: 1129
Editor: SheenaSmith
Comment: create page - 3/10 55a687c55676 (2/15 1800dc39b74c)
Revision 2 as of 2011-03-14 17:49:58
Size: 959
Editor: SheenaSmith
Comment: update content - w/ Sam; remove draft
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 29: Line 28:
The `x` and `y` of the viewport '''rect''' represent the origin for rendering.
Line 34: Line 31:
 .[[SDL_GetWindowSize]] ???
Line 38: Line 34:
[[CategoryAPI]], [[CategoryRenderer]] [[CategoryAPI]], [[CategoryRender]]

SDL_RenderSetViewport

Use this function to set the drawing area for rendering on the current target.

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.


CategoryAPI, CategoryRender

None: SDL_RenderSetViewport (last edited 2011-05-17 17:49:38 by SheenaSmith)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit