|
Size: 1516
Comment: content changed
|
Size: 1428
Comment: remove RFs
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 33: | Line 33: |
| The texture color is affected based on the color modulation set by [[SDL_SetTextureColorMod]](). The texture alpha is affected based on the alpha modulation set by [[SDL_SetTextureAlphaMod]](). | The texture color is affected based on the color modulation set by [[SDL_SetTextureColorMod]](). The texture alpha is affected based on the alpha modulation set by [[SDL_SetTextureAlphaMod]](). |
| Line 36: | Line 38: |
| .[[SDL_RenderLines]] .[[SDL_RenderPoints]] .[[SDL_RenderRect]] .[[SDL_RenderRects]] |
SDL_RenderCopy
Use this function to copy a portion of the texture to the current rendering target.
Contents
Syntax
int SDL_RenderCopy(SDL_TextureID textureID,
const SDL_Rect* srcrect,
const SDL_Rect* dstrect)
Function Parameters
textureID |
the source texture; see 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 |
Return Value
Returns 0 on success, or -1 if there is no rendering context current or the driver doesn't support the requested operation; 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 the color modulation set by SDL_SetTextureColorMod().
The texture alpha is affected based on the alpha modulation set by SDL_SetTextureAlphaMod().
