--- /dev/null
+/*!\r
+\r
+\r
+\mainpage SDL_gfx - SDL-1.2 graphics drawing primitives, rotozoom and other supporting functions\r
+\r
+\r
+\section contact_sec Contact and License\r
+\r
+Email aschiffler at ferzkopp dot net to contact the author or better check\r
+author's homepage at http://www.ferzkopp.net for the most up-to-date\r
+contact information.\r
+\r
+This library is licenced under the zlib License, see the file LICENSE for details. \r
+\r
+\r
+\section intro_sec Introduction\r
+\r
+The SDL_gfx library evolved out of the SDL_gfxPrimitives code which\r
+provided basic drawing routines such as lines, circles or polygons for \r
+SDL Surfaces and adding a couple other useful functions for zooming \r
+images for example and doing basic image processing on byte arrays.\r
+\r
+Note that SDL_gfx is compatible with SDL version 1.2 (not SDL2).\r
+\r
+The current components of the SDL_gfx library are:\r
+- Graphic Primitives (SDL_gfxPrimitives.h, SDL_gfxPrimitives.c)\r
+- Rotozoomer (SDL_rotozoom.h, SDL_rotozoom.c)\r
+- Framerate control (SDL_framerate.h, SDL_framerate.c)\r
+- MMX image filters (SDL_imageFilter.h, SDL_imageFilter.c)\r
+- Custom Blit functions (SDL_gfxBlitFunc.h, SDL_gfxBlitFunc.c)\r
+- Build-in 8x8 Font (SDL_gfxPrimitives_font.h)\r
+\r
+\r
+\r
+\subsection notes_gfx Notes on Graphics Primitives\r
+\r
+Care has been taken so that all routines are fully alpha-aware and can \r
+blend any primitive onto the target surface if ALPHA<255. Surface depths \r
+supported are 1,2,3 and 4 bytes per pixel. Surface locking is implemented\r
+in each routine and the library should work well with hardware \r
+accelerated surfaces. \r
+\r
+\htmlonly\r
+<a href="../Screenshots/SDL_gfxPrimitives.jpg" target="_blank" title="SDL_gfxPrimitives Screenshot"><img src="../Screenshots/SDL_gfxPrimitives-thumb.jpg" border="0" hspace="5"></a><br />\r
+\endhtmlonly\r
+\r
+Currently, The following Anti-Aliased drawing primitives are available:\r
+- AA-line\r
+- AA-polygon\r
+- AA-circle\r
+- AA-ellipse\r
+\r
+Note: All ___Color routines expect the color to be in the format 0xRRGGBBAA.\r
+\r
+\subsection notes_roto Notes on Rotozoomer\r
+\r
+The rotozoom code is not ASM-speed quality, but it should be fast enough \r
+even for some realtime effects if the CPU is good or bitmaps small.\r
+With interpolation the routines are typically used for pre-rendering stuff \r
+in higher quality (i.e. smoothing) - that's also the reason why the API differs \r
+from SDL_BlitRect() - as they create a new target surface each time rotozoom \r
+is called. The final rendering speed is dependent on the target surface\r
+size as it is beeing xy-scanned when rendering the new surface.\r
+\r
+\htmlonly\r
+<a href="../Screenshots/SDL_rotozoom.jpg" target="_blank" title="SDL_rotozoom Screenshot"><img src="../Screenshots/SDL_rotozoom-thumb.jpg" border="0" hspace="5"></a><br />\r
+\endhtmlonly\r
+\r
+Note also that the smoothing toggle is dependent on the input surface bit \r
+depth. 8bit surfaces will \b never be smoothed - only 32bit surfaces will.\r
+\r
+Note that surfaces of other bit depth then 8 and 32 will be converted \r
+on the fly to a 32bit surface using a blit into a temporary surface. This \r
+impacts performance somewhat.\r
+\r
+Smoothing (interpolation) flags work only on 32bit surfaces:\r
+\verbatim\r
+ #define SMOOTHING_OFF 0\r
+ #define SMOOTHING_ON 1\r
+\endverbatim\r
+ \r
+\subsection notes_rate Notes on Framerate Manager\r
+\r
+The framerate functions are used to insert delays into the graphics loop\r
+to maintain a constant framerate.\r
+\r
+The implementation is more sophisticated that the usual\r
+\verbatim\r
+ SDL_Delay(1000/FPS); \r
+\endverbatim\r
+call since these functions keep track of the desired game time per frame \r
+for a linearly interpolated sequence of future timing points of each frame. \r
+This is done to avoid rounding errors from the inherent instability in the \r
+delay generation and application.\r
+\r
+\htmlonly\r
+<a href="../framerate.png" target="_blank" title="Framerate Diagram"><img src="../framerate-thumb.png" border="0"></a><br />\r
+\endhtmlonly\r
+\r
+i.e. the 100th frame of a game running at 50Hz will be accurately\r
+2.00sec after the 1st frame (if the machine can keep up with the drawing).\r
+\r
+The functions return 0 or 'value' for sucess and -1 for error. All functions\r
+use a pointer to a framerate-manager variable to operate.\r
+\r
+\r
+\subsection notes_filter Notes on ImageFilters\r
+\r
+The imagefilter functions are a collection of MMX optimized routines that\r
+operate on continuous buffers of bytes - typically greyscale images from \r
+framegrabbers and such - performing functions such as image addition and \r
+binarization. All functions (almost ... not the the convolution routines) \r
+have a C implementation that is automatically used on systems without MMX \r
+capabilities.\r
+\r
+The compiler flag -DUSE_MMX toggles the conditional compile of MMX assembly.\r
+An assembler must be installed (i.e. "nasm").\r
+\r
+\r
+\subsection notes_blitters Notes on Custom Blitters\r
+\r
+The custom blitter functions provide (limited) support for surface\r
+compositing - that is surfaces can be blitted together, and then\r
+still blitted to the screen with transparency intact.\r
+\r
+\subsection platforms Supported Platforms\r
+\r
+\subsubsection platformlinux Unix/Linux\r
+\r
+The library compiles and is tested for a Linux target (gcc compiler) via the\r
+the usual configure;make;make install sequence.\r
+\r
+\subsubsection platformwindows Windows\r
+ \r
+A Win32 target is available (VisualC6/7/8/9, mingw32, xmingw32 cross-compiler).\r
+The SDL_gfx.sln will open VS2010 (the old VS2008 .sln is also still included) \r
+including express versions. \r
+\r
+See "Other Builds" for additional makefiles (may be out of date).\r
+\r
+When using the cross-compiler (available on the author's homepage, very\r
+out of date), the build process generates .DLLs. You can use the command \r
+line 'LIB.EXE' tool to generate VC6 compatible .LIB files for linking \r
+purposes. \r
+\r
+\subsubsection platformosx Mac OSX \r
+\r
+The usual autotools build chain should be used. MacPorts or fink may \r
+be required (that's what the author uses).\r
+\r
+Xcode is supported via templates. See "Other Builds" folder Xcode3+.zip -\r
+this template only supports SDL_gfx and not the tests. For this template, the\r
+Deployment Target (the lowest version to run on) is set to 10.5 and expects\r
+the SDL.framework preinstalled in some default location\r
+(either /Library/Frameworks, or ~/Library/Frameworks). \r
+\r
+Older targets are also reported to work (10.3+ native and Project Builder). \r
+\r
+\subsubsection platformqnx QNX\r
+\r
+QNX was reported to build (see .diff in "Other Builds").\r
+\r
+\subsubsection platformzune Zune\r
+\r
+ZuneHD (WinCE 6 ARM) is reported to build (see OpenZDK in "Other Builds").\r
+Note that between rendering on the Zune's ARM CPU and constantly uploading\r
+textures to the GPU, SDL_gfx is going to be slow. Also, the libc math \r
+functions all use software FP emulation even when VFP floating point\r
+support is turned on in the compiler, so there's extra overhead due to that\r
+as well.\r
+\r
+\subsubsection platformothers Others\r
+\r
+Other platforms might work but have not been tested by the author.\r
+Please check the file "INSTALL" as well as the folder "Other Builds".\r
+\r
+See also section "Installation" below for more build instructions.\r
+\r
+\section install_sec Installation\r
+\r
+\subsection unix Unix/Linux\r
+\r
+To compile the library your need the SDL 1.2 installed from source or \r
+installed with the 'devel' RPM package. For example on Mandriva, run:\r
+\verbatim\r
+ urpmi libSDL1.2-devel\r
+\endverbatim\r
+\r
+Then run\r
+\verbatim\r
+ ./autogen.sh # (optional, recommended)\r
+ ./configure\r
+ make\r
+ make install\r
+ ldconfig\r
+\endverbatim\r
+\r
+to compile and install the library. The default location for the \r
+installation is /usr/local/lib and /usr/local/include. The libary \r
+path might need to be added to the file:\r
+ /etc/ld.so.conf\r
+\r
+Run the shell script 'nodebug.sh' before make, to patch the makefile \r
+for optimized compilation:\r
+\verbatim\r
+ ./autogen.sh # (optional, recommended)\r
+ ./configure\r
+ ./nodebug.sh\r
+ make\r
+ make install\r
+ ldconfig\r
+\endverbatim\r
+\r
+Check the folder "Other Builds" for alternative makefiles.\r
+\r
+\subsection prep Build Prep\r
+\r
+Run autogen.sh or manually:\r
+\verbatim\r
+ aclocal --force\r
+ libtoolize --force --copy\r
+ autoreconf -fvi\r
+\endverbatim\r
+\r
+\subsection nommx No-MMX\r
+\r
+To build without MMX code enabled (i.e. PPC or for AMD64 architecture\r
+which is missing pusha/popa):\r
+\verbatim\r
+ ./configure --disable-mmx\r
+ make\r
+ make install\r
+\endverbatim\r
+i.e. to build on MacOSX 10.3+ use:\r
+\verbatim\r
+ ./configure --disable-mmx && make\r
+\endverbatim\r
+\r
+\subsection vs9 Windows (VC9, VS2010)\r
+\r
+Open SDL_gfx.sln solution file and review README.\r
+\r
+\subsection vs8 Windows (VC8, VS2008)\r
+\r
+Open SDL_gfx_VS2008.sln solution file and review README.\r
+\r
+\r
+\subsection vc6 Windows (VC6/7)\r
+\r
+See folder Other Builds.\r
+\r
+To create a Windows DLL using VisualC6:\r
+\verbatim\r
+ unzip -a VisualC6.zip\r
+ vcvars32.bat\r
+ copy VisualC/makefile\r
+ nmake\r
+\endverbatim\r
+or\r
+\verbatim\r
+ unzip -a VisualC7.zip\r
+\endverbatim\r
+and open the project file.\r
+\r
+\r
+\subsection wince WindowsCE\r
+\r
+See folder Other Builds.\r
+\r
+May need workaround for missing lrint.\r
+\r
+\r
+\subsection cross Cross-Compilation\r
+\r
+To build using mingw32 on Win32, check the makefile contained in mingw.zip\r
+\r
+To create a Windows DLL using the xmingw32 cross-compiler:\r
+\verbatim\r
+ cross-configure\r
+ cross-make\r
+ cross-make install\r
+\endverbatim\r
+\r
+Make sure the -DBUILD_DLL is used (and only then) when creating the DLLs.\r
+Make sure -DWIN32 is used when compiling the sources (creating or using\r
+the DLLs.\r
+\r
+Specify the path to your cross-compiled 'sdl-config', and invoke\r
+'./configure' with the '--host' and '--build' arguments. For example,\r
+to cross-compile a .DLL from GNU/Linux:\r
+\verbatim\r
+ SDL_CONFIG=/usr/local/cross-tools/i386-mingw32msvc/bin/sdl-config \\r
+ ./configure --host=i586-mingw32msvc --build=i686-pc-linux-gnu\r
+ make\r
+ make install\r
+\endverbatim\r
+\r
+\subsection qnx QNX\r
+\r
+To build on QNX6, patch first using:\r
+\verbatim\r
+ patch -p0 <QNX.diff\r
+\endverbatim\r
+\r
+\subsection osx OSX\r
+\r
+Use standard unix build sequence.\r
+\r
+To build on MacOS X with Project Builder, follow these steps:\r
+- Update your developer tools to the lastest version.\r
+- Install the SDL Developers framework for Mac OS X.\r
+- Download the latest SDL_gfx source distribution and extract the\r
+ archive in a convenient location.\r
+- Extract the included OSX-PB.tgz archive into the\r
+ top directory of the SDL_gfx distribution (from step 3). This will create a\r
+ PB that contains the project files.\r
+- The project has targets for the SDL_gfx framework and the four test\r
+ programs. All can be built using the 'deployment' or 'development' build\r
+ styles. \r
+\r
+A newer version for MaxOS X is included in the OSX-PB-XCode.zip archive. The \r
+updated version uses relative pathnames where appropriate, and pointers to \r
+the standard installation location of SDL. However, it may require XCode in \r
+order to be used.\r
+\r
+\section interfaces_sec Language Interfaces\r
+\r
+SDL_gfx has been integrated with the following language interfaces:\r
+- Pascal: http://www.freepascal-meets-sdl.net\r
+- Perl: http://sdl.perl.org\r
+- Python: http://www.pygame.org\r
+- C#: http://cs-sdl.sourceforge.net\r
+- Lua: http://www.egsl.retrogamecoding.org/\r
+- Oberon: http://sourceforge.net/projects/sdl-for-oberon/\r
+\r
+\section test_sec Test Programs\r
+\r
+Change to the ./Test directory and run\r
+\verbatim\r
+ ./autogen.sh\r
+ ./configure\r
+ make\r
+\endverbatim\r
+to create several test programs for the libraries functions. This requires\r
+the library to be previously compiled and installed.\r
+\r
+\r
+See the source code .c files for some sample code and implementation hints.\r
+\r
+\r
+\section contrib_sec Contributors\r
+\r
+- Fix for filledbox by Ingo van Lil, inguin at gmx.de - thanks Ingo.\r
+\r
+- Non-alpha line drawing code adapted from routine \r
+ by Pete Shinners, pete at shinners.org - thanks Pete.\r
+\r
+- More fixes by Karl Bartel, karlb at gmx.net - thanks Karl.\r
+\r
+- Much testing and suggestions for fixes from Danny van Bruggen,\r
+ danny at froukepc.dhs.org - thanks Danny.\r
+\r
+- Original AA-circle/-ellipse code idea from Stephane Magnenat, \r
+ nct at wg0.ysagoon.com - thanks Stephane.\r
+\r
+- Faster blending routines contributed by Anders Lindstroem,\r
+ cal at swipnet.se - thanks Anders.\r
+\r
+- New AA-circle/-ellipse code based on ideas from Anders Lindstroem - \r
+ thanks Anders.\r
+\r
+- VisualC makefile contributed by Danny van Bruggen, \r
+ danny at froukepc.dhs.org - thanks Danny.\r
+\r
+- VisualC7 project file contributed by James Turk, \r
+ jturk at conceptofzero.com - thanks James.\r
+\r
+- Project Builder package contributed by Thomas Tongue, \r
+ TTongue at imagiware.com - Thanks Thomas.\r
+\r
+- Fix for filledPolygon contributed by Kentaro Fukuchi \r
+ fukuchi at is.titech.ac.jp - Thanks Kentaro.\r
+\r
+- QNX6 patch contributed by Mike Gorchak,\r
+ mike at malva.ua - Thanks Mike.\r
+\r
+- Pie idea contributed by Eike Lange,\r
+ eike.lange at uni-essen.de - Thanks Eike.\r
+\r
+- Dynamic font setup by Todor Prokopov,\r
+ koprok at dir.bg - Thanks Todor.\r
+\r
+- Horizontal/Vertical flipping code by Victor (Haypo) \r
+ Stinner, victor.stinner at haypocalc.com - Thanks Victor.\r
+\r
+- OSX build fixes by Michael Wybrow, \r
+ mjwybrow at cs.mu.oz.au - Thanks Michael.\r
+\r
+- gcc3.4 build fixes by Dries Verachtert, \r
+ dries at ulyssis.org - Thanks Dries.\r
+\r
+- Updated OSX build by Brian Rice,\r
+ water451 at gmail.com - Thanks Brian.\r
+\r
+- aaellipse issues pointed out by Marco Wertz,\r
+ marco.wertz at gmx.de - Thanks Marco.\r
+\r
+- texturedPolygon idea and code by Kees Jongenburger,\r
+ kees.jongenburger at gmail.com - Thanks Kees.\r
+ \r
+- Several bugfixes contributed by Sigborn Skjaeret, \r
+ cisc at broadpark.no - Thanks CISC.\r
+\r
+- Syntax error for C++ found by Olivier Boudeville,\r
+ olivier.boudeville at online.fr - Thanks Olivier.\r
+\r
+- hline/vline clipping fixes found by Daniel Roggen,\r
+ droggen at gmail.com and Mikael Thieme, \r
+ mikael.thieme at his.se - Thanks Daniel+Mikael.\r
+\r
+- rotozoom fix for big-endian machines (i.e. PPC)\r
+ by Julian Mayer, julianmayer at mac.com - Thanks\r
+ Julian.\r
+\r
+- Cross-compilation notes contributed by Sylvain\r
+ Beucler, beuc at beuc.net - Thanks Sylvain.\r
+\r
+- Fix duplicate pixel renders in circleColor contributed\r
+ by David Raber, lotharstar at gmail.com - Thanks David.\r
+\r
+- New arcColor (and arcRGBA) routine contributed\r
+ by David Raber, lotharstar at gmail.com - Thanks David.\r
+\r
+- Idea for polygonColorMT and texturePolygonMT routines for\r
+ multithreaded operation contributed by "unknown" -\r
+ Thank you.\r
+\r
+- Multiple patches applied and repackaged version 2.0.18\r
+ by Paul, sweetlilmre at gmail.com - Thanks Paul and\r
+ other contributors of patches.\r
+\r
+- Change to avoid gcc4 compiler warnings contributed by Thien-Thi\r
+ nguyen, ttn at gnuvola.org - thanks Thi. \r
+\r
+- hline 1bpp off-by-one patch contributed by Manuel Lausch\r
+ mail at manuellausch.de - Thanks Manuel.\r
+\r
+- pkg-config support contributed by Luca Bigliardi, shammash\r
+ at artha.org - thanks Luca.\r
+\r
+- Updated mingw Makefile contributed by Jan Leike, jan dot leike \r
+ at gmx dot net - thanks Jan.\r
+\r
+- Rotozoom debugging help by Jeff Wilges, heff at ifup dot us -\r
+ thanks Jeff.\r
+\r
+- Build updates provided by Barry deFreese, bdefreese at debian \r
+ dot org - thanks Barry.\r
+\r
+- Fix for 1-pixel postponement with 8bit scaling by Sylvain Beucler, \r
+ beuc at beuc dot net - thanks Sylvain.\r
+\r
+- Updates to headers and configure to allow for cross-compiling \r
+ to DLL (not just static .a) and fixes for compiling on Windows \r
+ using autotools by Sylvain Beucler, beuc at beuc dot net - thanks Sylvain.\r
+\r
+- Added Visual CE Project to Builds. Contributed by vrichomme at smartmobili\r
+ dot com - thanks.\r
+\r
+- Added Symbian and Windows 64bit fix with lrint function by Rene \r
+ Dudfield, renesd at gmail dot com - thanks Rene.\r
+\r
+- Fixes for Rotate90 0-degree case by Chris Allport, chris dot allport\r
+ at gmail dot com - thanks Chris.\r
+\r
+- Fixed for Win32 build support defines by tigerfishdaisy (SF) - thanks\r
+ Tiger Tiger.\r
+\r
+- Patch for OpenSDK contributed by itsnotabigtruck at ovi dot com - thanks\r
+ IsNotABigTruck.\r
+\r
+- OSX Xcode 3+ template ZIP contributed by marabus at meta dot ua - thanks\r
+ Vasyl.\r
+\r
+- Memory leak/error check patch for zoomSurface contributed by \r
+ RodolfoRG - thanks Rodolfo.\r
+\r
+- Zoom scaling factor rounding bugfix patch contributed by WanderWander\r
+ Lairson Costa - thanks Wander.\r
+\r
+- Suggestions for speed improvements contributed by inkyankes - thanks.\r
+\r
+- Pixel blend routine patches contributed by mitja at lxnav dot com -\r
+ thanks Mitja.\r
+\r
+\section changelog_sec Change Log\r
+\r
+\verbinclude ChangeLog\r
+\r
+*/
\ No newline at end of file