Wiki Page Content

Differences between revisions 9 and 10
Revision 9 as of 2010-09-22 22:38:47
Size: 1489
Editor: SheenaSmith
Comment: update content - standard return value
Revision 10 as of 2010-10-09 03:58:19
Size: 1471
Editor: SheenaSmith
Comment: update content - pointers, structs
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
||'''texture'''||the source texture; see [[#Remarks|Remarks]] for details||
||'''srcrect'''||a pointer to the source rectangle, or NULL for the entire texture||
||'''dstrect'''||a pointer to the destination rectangle, or NULL for the entire rendering target||
||'''texture'''||the source SDL_Texture; see [[#Remarks|Remarks]] for details||
||'''srcrect'''||the source [[SDL_Rect]] or NULL for the entire texture||
||'''dstrect'''||the destination [[SDL_Rect]] or NULL for the entire rendering target||

SDL_RenderCopy

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

Syntax

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

Function Parameters

texture

the source SDL_Texture; see Remarks for details

srcrect

the source SDL_Rect or NULL for the entire texture

dstrect

the destination SDL_Rect 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.

purple

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, CategoryVideo

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