Wiki Page Content

Differences between revisions 12 and 13
Revision 12 as of 2011-02-15 19:37:29
Size: 1488
Editor: SheenaSmith
Comment: update content - 2/14 changeset 5295 (as of 5145); moved to render.h
Revision 13 as of 2011-02-16 23:50:45
Size: 1445
Editor: SheenaSmith
Comment: update content - 2/16 changeset 5318 (as of 5147)
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
int SDL_RenderCopy(SDL_Texture* texture, int SDL_RenderCopy(SDL_Renderer* renderer,
                   
SDL_Texture* texture,
Line 17: Line 18:
||'''renderer'''||the rendering context||
Line 23: Line 25:

<<Color2(purple,If there is no rendering context current or the driver doesn't support the requested operation it returns -1.)>>

SDL_RenderCopy

Use this function to copy a portion of the texture to the current rendering target.

Syntax

int SDL_RenderCopy(SDL_Renderer*   renderer,
                   SDL_Texture*    texture,
                   const SDL_Rect* srcrect,
                   const SDL_Rect* dstrect)

Function Parameters

renderer

the rendering context

texture

the source texture; see Remarks for details

srcrect

the source SDL_Rect structure or NULL for the entire texture

dstrect

the destination SDL_Rect structure or NULL for the entire rendering 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

The texture is blended with the destination based on its blend mode set with SDL_SetTextureBlendMode().

The texture color is affected based on its color modulation set by SDL_SetTextureColorMod().

The texture alpha is affected based on its alpha modulation set by SDL_SetTextureAlphaMod().


CategoryAPI, CategoryRender

None: SDL_RenderCopy (last edited 2015-08-18 20:57:36 by PhilippWiesemann)

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