SDL_RotateSurface - Man Page
Return a copy of a surface rotated clockwise a number of degrees.
Synopsis
#include <SDL3/SDL_surface.h> SDL_Surface * SDL_RotateSurface(SDL_Surface *surface, float angle);
Description
The angle of rotation can be negative for counter-clockwise rotation.
When the rotation isn't a multiple of 90 degrees, the resulting surface is larger than the original, with the background filled in with the colorkey, if available, or RGBA 255/255/255/0 if not.
Function Parameters
- surface
the surface to rotate.
- angle
the rotation angle, in degrees.
Return Value
Returns a rotated copy of the surface or NULL on failure; call SDL_GetError() for more information.
Thread Safety
This function can be called on different threads with different surfaces.
Availability
This function is available since SDL 3.4.0.
Info
SDL 3.3.2 Simple Directmedia Layer SDL3 FUNCTIONS