32 #ifndef _SDL2_rotozoom_h
33 #define _SDL2_rotozoom_h
44 #define M_PI 3.1415926535897932384626433832795
50 PRAGMA48(GCC diagnostic ignored
"-Wshadow")
59 #define SMOOTHING_OFF 0
64 #define SMOOTHING_ON 1
69 # if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT)
70 # define SDL2_ROTOZOOM_SCOPE __declspec(dllexport)
72 # ifdef LIBSDL2_GFX_DLL_IMPORT
73 # define SDL2_ROTOZOOM_SCOPE __declspec(dllimport)
77 #ifndef SDL2_ROTOZOOM_SCOPE
78 # define SDL2_ROTOZOOM_SCOPE extern
90 (SDL_Surface * src,
double angle,
double zoomx,
double zoomy,
int smooth);
97 (
int width,
int height,
double angle,
double zoomx,
double zoomy,
98 int *dstwidth,
int *dstheight);
SDL_Surface * rotozoomSurface(SDL_Surface *src, double angle, double zoom, int smooth)
Rotates and zooms a surface and optional anti-aliasing.
SDL_Surface * rotateSurface90Degrees(SDL_Surface *src, int numClockwiseTurns)
Rotates a 8/16/24/32 bit surface in increments of 90 degrees.
void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight)
Calculates the size of the target surface for a zoomSurface() call.
void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth, int *dstheight)
Returns the size of the resulting target surface for a rotozoomSurface() call.
SDL_Surface * rotozoomSurfaceXY(SDL_Surface *src, double angle, double zoomx, double zoomy, int smooth)
Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-...
SDL_Surface * shrinkSurface(SDL_Surface *src, int factorx, int factory)
Shrink a surface by an integer ratio using averaging.
#define SDL2_ROTOZOOM_SCOPE
SDL_Surface * zoomSurface(SDL_Surface *src, double zoomx, double zoomy, int smooth)
Zoom a surface by independent horizontal and vertical factors with optional smoothing.
void rotozoomSurfaceSizeXY(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight)
Returns the size of the resulting target surface for a rotozoomSurfaceXY() call.