Function sdl2_sys::SDL_RenderCopyEx
source ยท pub unsafe extern "C" fn SDL_RenderCopyEx(
renderer: *mut SDL_Renderer,
texture: *mut SDL_Texture,
srcrect: *const SDL_Rect,
dstrect: *const SDL_Rect,
angle: f64,
center: *const SDL_Point,
flip: SDL_RendererFlip,
) -> c_int
Expand description
Copy a portion of the texture to the current rendering, with optional rotation and flipping.
Copy a portion of the texture to the current rendering target, optionally rotating it by angle around the given center and also flipping it top-bottom and/or left-right.
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().
\param renderer the rendering context
\param texture the source texture
\param srcrect the source SDL_Rect structure or NULL for the entire texture
\param dstrect the destination SDL_Rect structure or NULL for the entire
rendering target
\param angle an angle in degrees that indicates the rotation that will be
applied to dstrect, rotating it in a clockwise direction
\param center a pointer to a point indicating the point around which
dstrect will be rotated (if NULL, rotation will be done
around dstrect.w / 2
, dstrect.h / 2
)
\param flip a SDL_RendererFlip value stating which flipping actions should
be performed on the texture
\returns 0 on success or a negative error code on failure; call
SDL_GetError() for more information.
\since This function is available since SDL 2.0.0.
\sa SDL_RenderCopy \sa SDL_SetTextureAlphaMod \sa SDL_SetTextureBlendMode \sa SDL_SetTextureColorMod