Skip to main content

SDL_RenderTextureRotated

Function SDL_RenderTextureRotated 

Source
pub unsafe extern "C" fn SDL_RenderTextureRotated(
    renderer: *mut SDL_Renderer,
    texture: *mut SDL_Texture,
    srcrect: *const SDL_FRect,
    dstrect: *const SDL_FRect,
    angle: f64,
    center: *const SDL_FPoint,
    flip: SDL_FlipMode,
) -> bool
Expand description

Copy a portion of the source texture to the current rendering target, with rotation and flipping, at subpixel precision.

Parameter: renderer the renderer which should copy parts of a texture. Parameter: texture the source texture. Parameter: srcrect a pointer to the source rectangle, or NULL for the entire texture. Parameter: dstrect a pointer to the destination rectangle, or NULL for the entire rendering target. Parameter: angle an angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction. Parameter: 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). Parameter: flip an SDL_FlipMode value stating which flipping actions should be performed on the texture. Returns: true on success or false on failure; call SDL_GetError() for more information.

Thread Safety: This function should only be called on the main thread.

Available Since: This function is available since SDL 3.2.0.

See Also: SDL_RenderTexture