- Main Page
- Data Structures
- Files

- File List
- Globals

# SDL_rotozoom.h

Go to the documentation of this file.

    00001
    00002 /*
    00003
    00004 SDL_rotozoom - rotozoomer
    00005
    00006 LGPL (c) A. Schiffler
    00007
    00008 */
    00009
    00010 #ifndef _SDL_rotozoom_h
    00011 #define _SDL_rotozoom_h
    00012
    00013 #include <math.h>
    00014
    00015 /* Set up for C function definitions, even when using C++ */
    00016 #ifdef __cplusplus
    00017 extern "C" {
    00018 #endif
    00019
    00020 #ifndef M_PI
    00021 #define M_PI    3.141592654
    00022 #endif
    00023
    00024 #include "SDL.h"
    00025
    00026         /* ---- Defines */
    00027
    00031 #define SMOOTHING_OFF           0
    00032
    00036 #define SMOOTHING_ON            1
    00037
    00038         /* ---- Function Prototypes */
    00039
    00040 #ifdef _MSC_VER
    00041 #  if defined(DLL_EXPORT) && !defined(LIBSDL_GFX_DLL_IMPORT)
    00042 #    define SDL_ROTOZOOM_SCOPE __declspec(dllexport)
    00043 #  else
    00044 #    ifdef LIBSDL_GFX_DLL_IMPORT
    00045 #      define SDL_ROTOZOOM_SCOPE __declspec(dllimport)
    00046 #    endif
    00047 #  endif
    00048 #endif
    00049 #ifndef SDL_ROTOZOOM_SCOPE
    00050 #  define SDL_ROTOZOOM_SCOPE extern
    00051 #endif
    00052
    00053         /*
    00054
    00055         Rotozoom functions
    00056
    00057         */
    00058
    00059         SDL_ROTOZOOM_SCOPE SDL_Surface *rotozoomSurface(SDL_Surface * src, double angle, double zoom, int smooth);
    00060
    00061         SDL_ROTOZOOM_SCOPE SDL_Surface *rotozoomSurfaceXY
    00062                 (SDL_Surface * src, double angle, double zoomx, double zoomy, int smooth);
    00063
    00064
    00065         SDL_ROTOZOOM_SCOPE void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth,
    00066                 int *dstheight);
    00067
    00068         SDL_ROTOZOOM_SCOPE void rotozoomSurfaceSizeXY
    00069                 (int width, int height, double angle, double zoomx, double zoomy,
    00070                 int *dstwidth, int *dstheight);
    00071
    00072         /*
    00073
    00074         Zooming functions
    00075
    00076         */
    00077
    00078         SDL_ROTOZOOM_SCOPE SDL_Surface *zoomSurface(SDL_Surface * src, double zoomx, double zoomy, int smooth);
    00079
    00080         SDL_ROTOZOOM_SCOPE void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight);
    00081
    00082         /*
    00083
    00084         Shrinking functions
    00085
    00086         */
    00087
    00088         SDL_ROTOZOOM_SCOPE SDL_Surface *shrinkSurface(SDL_Surface * src, int factorx, int factory);
    00089
    00090         /*
    00091
    00092         Specialized rotation functions
    00093
    00094         */
    00095
    00096         SDL_ROTOZOOM_SCOPE SDL_Surface* rotateSurface90Degrees(SDL_Surface* src, int numClockwiseTurns);
    00097
    00098         /* Ends C function definitions when using C++ */
    00099 #ifdef __cplusplus
    00100 }
    00101 #endif
    00102
    00103 #endif                          /* _SDL_rotozoom_h */