30 #ifndef _SDL2_rotozoom_h
31 #define _SDL2_rotozoom_h
41 #define M_PI 3.1415926535897932384626433832795
51 #define SMOOTHING_OFF 0
56 #define SMOOTHING_ON 1
61 # if defined(DLL_EXPORT) && !defined(LIBSDL2_GFX_DLL_IMPORT)
62 # define SDL2_ROTOZOOM_SCOPE __declspec(dllexport)
64 # ifdef LIBSDL2_GFX_DLL_IMPORT
65 # define SDL2_ROTOZOOM_SCOPE __declspec(dllimport)
69 #ifndef SDL2_ROTOZOOM_SCOPE
70 # define SDL2_ROTOZOOM_SCOPE extern
82 (SDL_Surface * src,
double angle,
double zoomx,
double zoomy,
int smooth);
89 (
int width,
int height,
double angle,
double zoomx,
double zoomy,
90 int *dstwidth,
int *dstheight);
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.
SDL2_ROTOZOOM_SCOPE 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-...
SDL2_ROTOZOOM_SCOPE SDL_Surface * rotozoomSurface(SDL_Surface *src, double angle, double zoom, int smooth)
Rotates and zooms a surface and optional anti-aliasing.
SDL2_ROTOZOOM_SCOPE 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.
SDL2_ROTOZOOM_SCOPE 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.
SDL2_ROTOZOOM_SCOPE SDL_Surface * shrinkSurface(SDL_Surface *src, int factorx, int factory)
Shrink a surface by an integer ratio using averaging.
SDL2_ROTOZOOM_SCOPE 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.
#define SDL2_ROTOZOOM_SCOPE
SDL2_ROTOZOOM_SCOPE SDL_Surface * rotateSurface90Degrees(SDL_Surface *src, int numClockwiseTurns)
Rotates a 8/16/24/32 bit surface in increments of 90 degrees.