2 * Derived from: SDL_rotozoom, LGPL (c) A. Schiffler from the SDL_gfx library.
3 * Modifications by Hyunjun Son(hj79.son@samsung.com)
5 * This work is licensed under the terms of the GNU GPL version 2.
6 * See the COPYING file in the top-level directory.
20 # define SDL_ROTOZOOM_SCOPE __declspec(dllexport)
22 # ifdef LIBSDL_GFX_DLL_IMPORT
23 # define SDL_ROTOZOOM_SCOPE __declspec(dllimport)
27 #ifndef SDL_ROTOZOOM_SCOPE
28 # define SDL_ROTOZOOM_SCOPE extern
35 Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface.
36 'angle' is the rotation in degrees. 'zoom' a scaling factor. If 'smooth' is 1
37 then the destination 32bit surface is anti-aliased. If the surface is not 8bit
38 or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.
42 SDL_ROTOZOOM_SCOPE SDL_Surface *rotozoomSurface(SDL_Surface * src, double angle, double zoom, int smooth);
44 SDL_ROTOZOOM_SCOPE SDL_Surface *rotozoomSurfaceXY
45 (SDL_Surface * src, double angle, double zoomx, double zoomy, int smooth);
47 /* Returns the size of the target surface for a rotozoomSurface() call */
49 SDL_ROTOZOOM_SCOPE void rotozoomSurfaceSize(int width, int height, double angle, double zoom, int *dstwidth,
52 SDL_ROTOZOOM_SCOPE void rotozoomSurfaceSizeXY
53 (int width, int height, double angle, double zoomx, double zoomy,
54 int *dstwidth, int *dstheight);
60 Zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface.
61 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is 1
62 then the destination 32bit surface is anti-aliased. If the surface is not 8bit
63 or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.
67 SDL_ROTOZOOM_SCOPE SDL_Surface *zoomSurface(SDL_Surface * src, double zoomx, double zoomy, int smooth);
69 /* Returns the size of the target surface for a zoomSurface() call */
71 SDL_ROTOZOOM_SCOPE void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight);
77 Shrinks a 32bit or 8bit 'src' surface ti a newly created 'dst' surface.
78 'factorx' and 'factory' are the shrinking ratios (i.e. 2=1/2 the size,
79 3=1/3 the size, etc.) The destination surface is antialiased by averaging
80 the source box RGBA or Y information. If the surface is not 8bit
81 or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.
84 SDL_ROTOZOOM_SCOPE SDL_Surface *shrinkSurface(SDL_Surface * src, int factorx, int factory);
92 SDL_ROTOZOOM_SCOPE SDL_Surface* rotateSurface90Degrees(SDL_Surface* pSurf, int numClockwiseTurns);
94 /* Ends C function definitions when using C++ */
99 #endif /* _SDL_rotate_h */