1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6<title>SDL_gfx: SDL_gfx - SDL-1.2 graphics drawing primitives, rotozoom and other supporting functions</title>
7
8<link href="tabs.css" rel="stylesheet" type="text/css"/>
9<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
11
12
13</head>
14<body>
15<div id="top"><!-- do not remove this div! -->
16
17
18<div id="titlearea">
19<table cellspacing="0" cellpadding="0">
20 <tbody>
21 <tr style="height: 56px;">
22
23
24  <td style="padding-left: 0.5em;">
25   <div id="projectname">SDL_gfx
26   &#160;<span id="projectnumber">2.0.25</span>
27   </div>
28
29  </td>
30
31
32
33 </tr>
34 </tbody>
35</table>
36</div>
37
38<!-- Generated by Doxygen 1.8.0 -->
39  <div id="navrow1" class="tabs">
40    <ul class="tablist">
41      <li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
42      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
43      <li><a href="files.html"><span>Files</span></a></li>
44    </ul>
45  </div>
46</div>
47<div class="header">
48  <div class="headertitle">
49<div class="title">SDL_gfx - SDL-1.2 graphics drawing primitives, rotozoom and other supporting functions </div>  </div>
50</div><!--header-->
51<div class="contents">
52<div class="textblock"><h2><a class="anchor" id="contact_sec"></a>
53Contact and License</h2>
54<p>Email aschiffler at ferzkopp dot net to contact the author or better check author's homepage at <a href="http://www.ferzkopp.net">http://www.ferzkopp.net</a> for the most up-to-date contact information.</p>
55<p>This library is licenced under the zlib License, see the file LICENSE for details.</p>
56<h2><a class="anchor" id="intro_sec"></a>
57Introduction</h2>
58<p>The SDL_gfx library evolved out of the SDL_gfxPrimitives code which provided basic drawing routines such as lines, circles or polygons for SDL Surfaces and adding a couple other useful functions for zooming images for example and doing basic image processing on byte arrays.</p>
59<p>Note that SDL_gfx is compatible with SDL version 1.2 (not SDL2).</p>
60<p>The current components of the SDL_gfx library are:</p>
61<ul>
62<li>Graphic Primitives (<a class="el" href="_s_d_l__gfx_primitives_8h.html">SDL_gfxPrimitives.h</a>, <a class="el" href="_s_d_l__gfx_primitives_8c.html">SDL_gfxPrimitives.c</a>)</li>
63<li>Rotozoomer (<a class="el" href="_s_d_l__rotozoom_8h.html">SDL_rotozoom.h</a>, <a class="el" href="_s_d_l__rotozoom_8c.html">SDL_rotozoom.c</a>)</li>
64<li>Framerate control (<a class="el" href="_s_d_l__framerate_8h.html">SDL_framerate.h</a>, <a class="el" href="_s_d_l__framerate_8c.html">SDL_framerate.c</a>)</li>
65<li>MMX image filters (<a class="el" href="_s_d_l__image_filter_8h.html">SDL_imageFilter.h</a>, <a class="el" href="_s_d_l__image_filter_8c.html">SDL_imageFilter.c</a>)</li>
66<li>Custom Blit functions (<a class="el" href="_s_d_l__gfx_blit_func_8h.html">SDL_gfxBlitFunc.h</a>, <a class="el" href="_s_d_l__gfx_blit_func_8c.html">SDL_gfxBlitFunc.c</a>)</li>
67<li>Build-in 8x8 Font (<a class="el" href="_s_d_l__gfx_primitives__font_8h.html">SDL_gfxPrimitives_font.h</a>)</li>
68</ul>
69<h3><a class="anchor" id="notes_gfx"></a>
70Notes on Graphics Primitives</h3>
71<p>Care has been taken so that all routines are fully alpha-aware and can blend any primitive onto the target surface if ALPHA&lt;255. Surface depths supported are 1,2,3 and 4 bytes per pixel. Surface locking is implemented in each routine and the library should work well with hardware accelerated surfaces.</p>
72
73<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 />
74<p>Currently, The following Anti-Aliased drawing primitives are available:</p>
75<ul>
76<li>AA-line</li>
77<li>AA-polygon</li>
78<li>AA-circle</li>
79<li>AA-ellipse</li>
80</ul>
81<p>Note: All ___Color routines expect the color to be in the format 0xRRGGBBAA.</p>
82<h3><a class="anchor" id="notes_roto"></a>
83Notes on Rotozoomer</h3>
84<p>The rotozoom code is not ASM-speed quality, but it should be fast enough even for some realtime effects if the CPU is good or bitmaps small. With interpolation the routines are typically used for pre-rendering stuff in higher quality (i.e. smoothing) - that's also the reason why the API differs from SDL_BlitRect() - as they create a new target surface each time rotozoom is called. The final rendering speed is dependent on the target surface size as it is beeing xy-scanned when rendering the new surface.</p>
85
86<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 />
87<p>Note also that the smoothing toggle is dependent on the input surface bit depth. 8bit surfaces will <b>never</b> be smoothed - only 32bit surfaces will.</p>
88<p>Note that surfaces of other bit depth then 8 and 32 will be converted on the fly to a 32bit surface using a blit into a temporary surface. This impacts performance somewhat.</p>
89<p>Smoothing (interpolation) flags work only on 32bit surfaces: </p>
90<div class="fragment"><pre class="fragment"> #define SMOOTHING_OFF          0
91 #define SMOOTHING_ON           1
92</pre></div><h3><a class="anchor" id="notes_rate"></a>
93Notes on Framerate Manager</h3>
94<p>The framerate functions are used to insert delays into the graphics loop to maintain a constant framerate.</p>
95<p>The implementation is more sophisticated that the usual </p>
96<div class="fragment"><pre class="fragment">        SDL_Delay(1000/FPS);
97</pre></div><p> call since these functions keep track of the desired game time per frame for a linearly interpolated sequence of future timing points of each frame. This is done to avoid rounding errors from the inherent instability in the delay generation and application.</p>
98
99<a href="../framerate.png" target="_blank" title="Framerate Diagram"><img src="../framerate-thumb.png" border="0"></a><br />
100<p>i.e. the 100th frame of a game running at 50Hz will be accurately 2.00sec after the 1st frame (if the machine can keep up with the drawing).</p>
101<p>The functions return 0 or 'value' for sucess and -1 for error. All functions use a pointer to a framerate-manager variable to operate.</p>
102<h3><a class="anchor" id="notes_filter"></a>
103Notes on ImageFilters</h3>
104<p>The imagefilter functions are a collection of MMX optimized routines that operate on continuous buffers of bytes - typically greyscale images from framegrabbers and such - performing functions such as image addition and binarization. All functions (almost ... not the the convolution routines) have a C implementation that is automatically used on systems without MMX capabilities.</p>
105<p>The compiler flag -DUSE_MMX toggles the conditional compile of MMX assembly. An assembler must be installed (i.e. "nasm").</p>
106<h3><a class="anchor" id="notes_blitters"></a>
107Notes on Custom Blitters</h3>
108<p>The custom blitter functions provide (limited) support for surface compositing - that is surfaces can be blitted together, and then still blitted to the screen with transparency intact.</p>
109<h3><a class="anchor" id="platforms"></a>
110Supported Platforms</h3>
111<h4><a class="anchor" id="platformlinux"></a>
112Unix/Linux</h4>
113<p>The library compiles and is tested for a Linux target (gcc compiler) via the the usual configure;make;make install sequence.</p>
114<h4><a class="anchor" id="platformwindows"></a>
115Windows</h4>
116<p>A Win32 target is available (VisualC6/7/8/9, mingw32, xmingw32 cross-compiler). The SDL_gfx_VS2010.sln will open VS2010 (the old VS2008 .sln is also still included) including express versions.</p>
117<p>See "Other Builds" for additional makefiles (may be out of date).</p>
118<p>When using the cross-compiler (available on the author's homepage, very out of date), the build process generates .DLLs. You can use the command line 'LIB.EXE' tool to generate VC6 compatible .LIB files for linking purposes.</p>
119<h4><a class="anchor" id="platformosx"></a>
120Mac OSX</h4>
121<p>The usual autotools build chain should be used. MacPorts or fink may be required (that's what the author uses).</p>
122<p>Xcode is supported via templates. See "Other Builds" folder Xcode3+.zip - this template only supports SDL_gfx and not the tests. For this template, the Deployment Target (the lowest version to run on) is set to 10.5 and expects the SDL.framework preinstalled in some default location (either /Library/Frameworks, or ~/Library/Frameworks).</p>
123<p>Older targets are also reported to work (10.3+ native and Project Builder).</p>
124<h4><a class="anchor" id="platformqnx"></a>
125QNX</h4>
126<p>QNX was reported to build (see .diff in "Other Builds").</p>
127<h4><a class="anchor" id="platformzune"></a>
128Zune</h4>
129<p>ZuneHD (WinCE 6 ARM) is reported to build (see OpenZDK in "Other Builds"). Note that between rendering on the Zune's ARM CPU and constantly uploading textures to the GPU, SDL_gfx is going to be slow. Also, the libc math functions all use software FP emulation even when VFP floating point support is turned on in the compiler, so there's extra overhead due to that as well.</p>
130<h4><a class="anchor" id="platformothers"></a>
131Others</h4>
132<p>Other platforms might work but have not been tested by the author. Please check the file "INSTALL" as well as the folder "Other Builds".</p>
133<p>See also section "Installation" below for more build instructions.</p>
134<h2><a class="anchor" id="install_sec"></a>
135Installation</h2>
136<h3><a class="anchor" id="unix"></a>
137Unix/Linux</h3>
138<p>To compile the library your need the SDL 1.2 installed from source or installed with the 'devel' RPM package. For example on Mandriva, run: </p>
139<div class="fragment"><pre class="fragment">        urpmi  libSDL1.2-devel
140</pre></div><p>Then run </p>
141<div class="fragment"><pre class="fragment">        ./autogen.sh    # (optional, recommended)
142        ./configure
143        make
144        make install
145        ldconfig
146</pre></div><p>to compile and install the library. The default location for the installation is /usr/local/lib and /usr/local/include. The libary path might need to be added to the file: /etc/ld.so.conf</p>
147<p>Run the shell script 'nodebug.sh' before make, to patch the makefile for optimized compilation: </p>
148<div class="fragment"><pre class="fragment">        ./autogen.sh    # (optional, recommended)
149        ./configure
150        ./nodebug.sh
151        make
152        make install
153        ldconfig
154</pre></div><p>Check the folder "Other Builds" for alternative makefiles.</p>
155<h3><a class="anchor" id="prep"></a>
156Build Prep</h3>
157<p>Run autogen.sh or manually: </p>
158<div class="fragment"><pre class="fragment">        aclocal --force
159        libtoolize --force --copy
160        autoreconf -fvi
161</pre></div><h3><a class="anchor" id="nommx"></a>
162No-MMX</h3>
163<p>To build without MMX code enabled (i.e. PPC or for AMD64 architecture which is missing pusha/popa): </p>
164<div class="fragment"><pre class="fragment">        ./configure --disable-mmx
165        make
166        make install
167</pre></div><p> i.e. to build on MacOSX 10.3+ use: </p>
168<div class="fragment"><pre class="fragment">        ./configure --disable-mmx &amp;&amp; make
169</pre></div><h3><a class="anchor" id="vs9"></a>
170Windows (VC9, VS2010)</h3>
171<p>Open SDL_gfx_VS2010.sln solution file and review README.</p>
172<h3><a class="anchor" id="vs8"></a>
173Windows (VC8, VS2008)</h3>
174<p>Open SDL_gfx_VS2008.sln solution file and review README.</p>
175<h3><a class="anchor" id="vc6"></a>
176Windows (VC6/7)</h3>
177<p>See folder Other Builds.</p>
178<p>To create a Windows DLL using VisualC6: </p>
179<div class="fragment"><pre class="fragment">        unzip -a VisualC6.zip
180        vcvars32.bat
181        copy VisualC/makefile
182        nmake
183</pre></div><p> or </p>
184<div class="fragment"><pre class="fragment">        unzip -a VisualC7.zip
185</pre></div><p> and open the project file.</p>
186<h3><a class="anchor" id="wince"></a>
187WindowsCE</h3>
188<p>See folder Other Builds.</p>
189<p>May need workaround for missing lrint.</p>
190<h3><a class="anchor" id="cross"></a>
191Cross-Compilation</h3>
192<p>To build using mingw32 on Win32, check the makefile contained in mingw.zip</p>
193<p>To create a Windows DLL using the xmingw32 cross-compiler: </p>
194<div class="fragment"><pre class="fragment">        cross-configure
195        cross-make
196        cross-make install
197</pre></div><p>Make sure the -DBUILD_DLL is used (and only then) when creating the DLLs. Make sure -DWIN32 is used when compiling the sources (creating or using the DLLs.</p>
198<p>Specify the path to your cross-compiled 'sdl-config', and invoke './configure' with the '--host' and '--build' arguments. For example, to cross-compile a .DLL from GNU/Linux: </p>
199<div class="fragment"><pre class="fragment">        SDL_CONFIG=/usr/local/cross-tools/i386-mingw32msvc/bin/sdl-config \
200                ./configure --host=i586-mingw32msvc --build=i686-pc-linux-gnu
201        make
202        make install
203</pre></div><h3><a class="anchor" id="qnx"></a>
204QNX</h3>
205<p>To build on QNX6, patch first using: </p>
206<div class="fragment"><pre class="fragment">        patch -p0 &lt;QNX.diff
207</pre></div><h3><a class="anchor" id="osx"></a>
208OSX</h3>
209<p>Use standard unix build sequence.</p>
210<p>To build on MacOS X with Project Builder, follow these steps:</p>
211<ul>
212<li>Update your developer tools to the lastest version.</li>
213<li>Install the SDL Developers framework for Mac OS X.</li>
214<li>Download the latest SDL_gfx source distribution and extract the archive in a convenient location.</li>
215<li>Extract the included OSX-PB.tgz archive into the top directory of the SDL_gfx distribution (from step 3). This will create a PB that contains the project files.</li>
216<li>The project has targets for the SDL_gfx framework and the four test programs. All can be built using the 'deployment' or 'development' build styles.</li>
217</ul>
218<p>A newer version for MaxOS X is included in the OSX-PB-XCode.zip archive. The updated version uses relative pathnames where appropriate, and pointers to the standard installation location of SDL. However, it may require XCode in order to be used.</p>
219<h2><a class="anchor" id="interfaces_sec"></a>
220Language Interfaces</h2>
221<p>SDL_gfx has been integrated with the following language interfaces:</p>
222<ul>
223<li>Pascal: <a href="http://www.freepascal-meets-sdl.net">http://www.freepascal-meets-sdl.net</a></li>
224<li>Perl: <a href="http://sdl.perl.org">http://sdl.perl.org</a></li>
225<li>Python: <a href="http://www.pygame.org">http://www.pygame.org</a></li>
226<li>C#: <a href="http://cs-sdl.sourceforge.net">http://cs-sdl.sourceforge.net</a></li>
227<li>Lua: <a href="http://www.egsl.retrogamecoding.org/">http://www.egsl.retrogamecoding.org/</a></li>
228<li>Oberon: <a href="http://sourceforge.net/projects/sdl-for-oberon/">http://sourceforge.net/projects/sdl-for-oberon/</a></li>
229</ul>
230<h2><a class="anchor" id="test_sec"></a>
231Test Programs</h2>
232<p>Change to the ./Test directory and run </p>
233<div class="fragment"><pre class="fragment">        ./autogen.sh
234        ./configure
235        make
236</pre></div><p> to create several test programs for the libraries functions. This requires the library to be previously compiled and installed.</p>
237<p>See the source code .c files for some sample code and implementation hints.</p>
238<h2><a class="anchor" id="contrib_sec"></a>
239Contributors</h2>
240<ul>
241<li>Fix for filledbox by Ingo van Lil, inguin at gmx.de - thanks Ingo.</li>
242</ul>
243<ul>
244<li>Non-alpha line drawing code adapted from routine by Pete Shinners, pete at shinners.org - thanks Pete.</li>
245</ul>
246<ul>
247<li>More fixes by Karl Bartel, karlb at gmx.net - thanks Karl.</li>
248</ul>
249<ul>
250<li>Much testing and suggestions for fixes from Danny van Bruggen, danny at froukepc.dhs.org - thanks Danny.</li>
251</ul>
252<ul>
253<li>Original AA-circle/-ellipse code idea from Stephane Magnenat, nct at wg0.ysagoon.com - thanks Stephane.</li>
254</ul>
255<ul>
256<li>Faster blending routines contributed by Anders Lindstroem, cal at swipnet.se - thanks Anders.</li>
257</ul>
258<ul>
259<li>New AA-circle/-ellipse code based on ideas from Anders Lindstroem - thanks Anders.</li>
260</ul>
261<ul>
262<li>VisualC makefile contributed by Danny van Bruggen, danny at froukepc.dhs.org - thanks Danny.</li>
263</ul>
264<ul>
265<li>VisualC7 project file contributed by James Turk, jturk at conceptofzero.com - thanks James.</li>
266</ul>
267<ul>
268<li>Project Builder package contributed by Thomas Tongue, TTongue at imagiware.com - Thanks Thomas.</li>
269</ul>
270<ul>
271<li>Fix for filledPolygon contributed by Kentaro Fukuchi fukuchi at is.titech.ac.jp - Thanks Kentaro.</li>
272</ul>
273<ul>
274<li>QNX6 patch contributed by Mike Gorchak, mike at malva.ua - Thanks Mike.</li>
275</ul>
276<ul>
277<li>Pie idea contributed by Eike Lange, eike.lange at uni-essen.de - Thanks Eike.</li>
278</ul>
279<ul>
280<li>Dynamic font setup by Todor Prokopov, koprok at dir.bg - Thanks Todor.</li>
281</ul>
282<ul>
283<li>Horizontal/Vertical flipping code by Victor (Haypo) Stinner, victor.stinner at haypocalc.com - Thanks Victor.</li>
284</ul>
285<ul>
286<li>OSX build fixes by Michael Wybrow, mjwybrow at cs.mu.oz.au - Thanks Michael.</li>
287</ul>
288<ul>
289<li>gcc3.4 build fixes by Dries Verachtert, dries at ulyssis.org - Thanks Dries.</li>
290</ul>
291<ul>
292<li>Updated OSX build by Brian Rice, water451 at gmail.com - Thanks Brian.</li>
293</ul>
294<ul>
295<li>aaellipse issues pointed out by Marco Wertz, marco.wertz at gmx.de - Thanks Marco.</li>
296</ul>
297<ul>
298<li>texturedPolygon idea and code by Kees Jongenburger, kees.jongenburger at gmail.com - Thanks Kees.</li>
299</ul>
300<ul>
301<li>Several bugfixes contributed by Sigborn Skjaeret, cisc at broadpark.no - Thanks CISC.</li>
302</ul>
303<ul>
304<li>Syntax error for C++ found by Olivier Boudeville, olivier.boudeville at online.fr - Thanks Olivier.</li>
305</ul>
306<ul>
307<li>hline/vline clipping fixes found by Daniel Roggen, droggen at gmail.com and Mikael Thieme, mikael.thieme at his.se - Thanks Daniel+Mikael.</li>
308</ul>
309<ul>
310<li>rotozoom fix for big-endian machines (i.e. PPC) by Julian Mayer, julianmayer at mac.com - Thanks Julian.</li>
311</ul>
312<ul>
313<li>Cross-compilation notes contributed by Sylvain Beucler, beuc at beuc.net - Thanks Sylvain.</li>
314</ul>
315<ul>
316<li>Fix duplicate pixel renders in circleColor contributed by David Raber, lotharstar at gmail.com - Thanks David.</li>
317</ul>
318<ul>
319<li>New arcColor (and arcRGBA) routine contributed by David Raber, lotharstar at gmail.com - Thanks David.</li>
320</ul>
321<ul>
322<li>Idea for polygonColorMT and texturePolygonMT routines for multithreaded operation contributed by "unknown" - Thank you.</li>
323</ul>
324<ul>
325<li>Multiple patches applied and repackaged version 2.0.18 by Paul, sweetlilmre at gmail.com - Thanks Paul and other contributors of patches.</li>
326</ul>
327<ul>
328<li>Change to avoid gcc4 compiler warnings contributed by Thien-Thi nguyen, ttn at gnuvola.org - thanks Thi.</li>
329</ul>
330<ul>
331<li>hline 1bpp off-by-one patch contributed by Manuel Lausch mail at manuellausch.de - Thanks Manuel.</li>
332</ul>
333<ul>
334<li>pkg-config support contributed by Luca Bigliardi, shammash at artha.org - thanks Luca.</li>
335</ul>
336<ul>
337<li>Updated mingw Makefile contributed by Jan Leike, jan dot leike at gmx dot net - thanks Jan.</li>
338</ul>
339<ul>
340<li>Rotozoom debugging help by Jeff Wilges, heff at ifup dot us - thanks Jeff.</li>
341</ul>
342<ul>
343<li>Build updates provided by Barry deFreese, bdefreese at debian dot org - thanks Barry.</li>
344</ul>
345<ul>
346<li>Fix for 1-pixel postponement with 8bit scaling by Sylvain Beucler, beuc at beuc dot net - thanks Sylvain.</li>
347</ul>
348<ul>
349<li>Updates to headers and configure to allow for cross-compiling to DLL (not just static .a) and fixes for compiling on Windows using autotools by Sylvain Beucler, beuc at beuc dot net - thanks Sylvain.</li>
350</ul>
351<ul>
352<li>Added Visual CE Project to Builds. Contributed by vrichomme at smartmobili dot com - thanks.</li>
353</ul>
354<ul>
355<li>Added Symbian and Windows 64bit fix with lrint function by Rene Dudfield, renesd at gmail dot com - thanks Rene.</li>
356</ul>
357<ul>
358<li>Fixes for Rotate90 0-degree case by Chris Allport, chris dot allport at gmail dot com - thanks Chris.</li>
359</ul>
360<ul>
361<li>Fixed for Win32 build support defines by tigerfishdaisy (SF) - thanks Tiger Tiger.</li>
362</ul>
363<ul>
364<li>Patch for OpenSDK contributed by itsnotabigtruck at ovi dot com - thanks IsNotABigTruck.</li>
365</ul>
366<ul>
367<li>OSX Xcode 3+ template ZIP contributed by marabus at meta dot ua - thanks Vasyl.</li>
368</ul>
369<ul>
370<li>Memory leak/error check patch for zoomSurface contributed by RodolfoRG - thanks Rodolfo.</li>
371</ul>
372<ul>
373<li>Zoom scaling factor rounding bugfix patch contributed by WanderWander Lairson Costa - thanks Wander.</li>
374</ul>
375<ul>
376<li>Suggestions for speed improvements contributed by inkyankes - thanks.</li>
377</ul>
378<ul>
379<li>Pixel blend routine patches contributed by mitja at lxnav dot com - thanks Mitja.</li>
380</ul>
381<ul>
382<li>ImageFilter patches contributed by beuc at beuc dot net - thanks Sylvain.</li>
383</ul>
384<ul>
385<li>Bug reports contributed by Yannick dot Guesnet at univ-rouen dot fr -</li>
386<li>thanks Yannick.</li>
387</ul>
388<h2><a class="anchor" id="changelog_sec"></a>
389Change Log</h2>
390<div class="fragment"><pre class="fragment">CHANGES/VERSION
391===============
392
393Ver 2.0.25 - Sun, Oct 27, 2013  3:08:15 PM
394* Added patch for 32- and 64-bit GCC-compiled MMX support
395  (contributed by Sylvain Beucler, backported from SDL2_gfx)
396* Fixed bug in _aaline when x1&gt;x2 and dy==0 (found by Yannick
397  Guesnet - thanks!)
398* Updated documentation.
399* Fixed header in SDL_gfxBlitFunc.h (reported by Jaders77 on
400  sourceforge - thanks!)
401
402Ver 2.0.24 - Sun, Jul 22, 2012  9:27:29 AM
403* Removed some missed LGPL references
404* Fixed thick line swap bug (patch contributed by Thien-Thi)
405  and added accuracy test for thick line
406* Improved interface to SDL_framerateDelay (idea contributed by
407  Neil)
408* Fixed dramerate modules dependency on SDL_GetTicks returning a
409  value &gt;0 (issue report contributed by Douglas)
410* Fixed 32bpp blending function for BGRA (thanks for the test code
411  and contributing a fix sabbetts/Jay)
412* Updated VS2010 solution file to use SDL-1.2 sources
413* Fix for pixel blend routine (patch contributes by Mitjia)
414
415Ver 2.0.23 - Sat Dec  3 22:55:04 PST 2011
416* Updated sources to resolve some splint (static code analysis)
417  issues
418* Updates for OpenSDK (WinCE6/ARM) build target (patch contributed
419  itsnotabigtruck)
420* Added OSX Xcode3+ template files to Other Builds collection
421  (contributed by Vasyl)
422* Added various fixes and improvements contributed by folks on
423  sourceforge (thanks contributors).
424* Switched library and test code to zlib license.
425
426Ver 2.0.22 - Sat Sep 11 23:26:42 EDT 2010
427* Fixed line width calculation for normal and textured polygons
428  (patch contributed by Daniel (SupSuper)
429* Fixed version setup in configure.in
430* Added rounded rectangle and rounded box primitives
431* Updated test program for roundedbox + left/right-click support
432* Fixed pie calculation (line-case detection, end-angle clipping)
433* Updated DLL_EXPORT handling and added WIN64 test
434  (patch contributed by tigerfishdaisy)
435* Added thick line primitive based on Murphy's algorithm
436
437Ver 2.0.21 - Thu May 27 21:14:37 PDT 2010
438* Add VC9 project files, source code formatting, fix compiler
439  warnings, move VC8 project files, remove leftover autoconf/m4 files
440* Move static transfer lookup array from .h to .c
441  (patch contributed by Zbigniew Holdys)
442* Add support for VC++ compiler/MASM assembly with active USE_MMX
443  (contributed by Markus Hossner)
444* Added Haiku build support in configure.in
445  (contributed by Scott McCreary)
446* Added helper function that multiplies the alpha channel in
447  a 32bit surface (contributed by Zbigniew Holdys)
448* Disable MMX for 64bit platforms due to lack of support for
449  pusha/popa (contributed by Olivier Boudeville)
450* Update all library functions for doxygen markup. Add doxygen
451  configuration file.
452* Added font rotation support and updated TestFonts sample
453* Fixed rotate90 for 0 degree case
454  (contributed by Chris Allport)
455* Updated TestRotozoom with rotate90 case and message display
456* Added support for SDL 1.3
457* Added doxygen generated documentation.
458
459Ver 2.0.20 - Wed Sep 23 18:42:02 PDT 2009
460* Fix for 1-pixel postponement with 8bit scaling
461* Updates to headers and configure to allow for cross-compiling
462  to DLL (not just static .a) and fixes for compiling on Windows
463  using autotools
464* Added Visual CE Project to Other Builds
465* Added Symbian and Windows 64bit fix for lrint function.
466
467Ver 2.0.19 - Mon Apr 20 22:56:59 PDT 2009
468
469* gcc43 compiler patch for asm code in image filters
470  as per http://bugs.gentoo.org/219621 (Peter Alfredsen)
471* off-by-one hline patch for 1byte indexed surfaces (Manuel Lausch)
472* update acinclude.m4 from SDL-1.2 and moved # serial in file
473* applied patch to add pkg-config support for SDL_gfx (Luca Bigliardi)
474* changed configure.in INTERFACE_AGE and BINARY_AGE based on Debian
475  build feedback (Barry deFreese)
476* fixed zoom XY-flip code and made it available for all modes in
477  zoom and rotations
478* fixed edge issue on interpolated rotozoom modes
479* updated TestRotozoom custom test mode, added delay parameter, added
480  tests which include flipping, included negative rotation
481* update libtool files
482* updated Makefile.mingw (Jan Leike)
483
484Ver 2.0.18 - Sun Dec 21 08:38:20 PST 2008
485
486* libtool update for dependencies
487* MSVC C89 variable hoisting to enable MSVC compile (sweetlilmre)
488* addition of VC9 (Visual Studio 2008) project file (sweetlilmre)
489* update to MinGW make file (Sergio Padrino, sweetlilmre)
490* fix uninitialised variables in _putPixelAlpha() (Paul Pedriana)
491* reverted to original alpha routine in _putPixelAlpha() as new one was causing issues in 16bbp
492  new routine #define has been renamed to EXPERIMENTAL_ALPHA_PIXEL_ROUTINE
493  original is now DEFAULT_ALPHA_PIXEL_ROUTINE
494* added colorkey handling patch to rotozoom (Sergio Padrino)
495* downgraded optimization to -O for asm compatibility with gcc4
496
497
498Ver 2.0.17 - Sun Jun  1 15:39:38 EDT 2008
499
500* hline/vline clipping and swap-logic fixed
501* clipping box dimension check added and clipping-checks optimized
502* TestFonts program updated
503* Updated documentation on cross-compilation, AMD64
504* Fixed circleColor overdraw
505* Added arcColor routine
506* Added polygonColorMT and polygonTextureMT routines
507* Updated 32bit alpha blending routine
508
509
510Ver 2.0.16 - Mon Feb  5 19:03:31 AST 2007
511* updated config.sub to newer version
512* added custom RGBA blitter function that sets/maintains target alpha
513* added setAlpha function that sets alpha values in 32bit surfaces
514* added TextGfxBlit testprogram for new functions
515* Fixed C++ type in .h files (thanks Olivier)
516* Update some text in README and .spec file
517* Removed broken Uint filter routines from test program
518* "Cosmetic" changes to test programs and Automake.am
519
520
521Ver 2.0.15 - Fri Dec 22 08:44:31 AST 2006
522* bugfixes in 32bit _putPixelAlpha/filledRectAlpha (thanks CISC)
523* various bugfixes in return value generation and return (thanks CISC)
524* lock font-surface before using it (thanks CISC)
525* fix some breakage in non-MMX filter routines (thanks CISC)
526* fix typo in TestABGR (thanks CISC)
527* fix double buffer flipping in Tets programs (thanks CISC)
528* fixed microversion in .h
529* fixed texturePolygon inverted bug
530* fixed wrong surface use in test 21 of TestRotozoom
531* added pitch handling in font surface (thanks CISC)
532
533
534Ver 2.0.14 - Tue Dec 19 08:49:02 AST 2006
535* added texturedPolygon routine to library (thanks Jees)
536* changed iterator condition in aaellipse to add some overdraw to smooth circle
537* added ShrinkImage routine to rotozoom code
538* added TestABGR Test program (bug in SDL_gfx or SDL??)
539* improved TestImageFilter program (bug in Uint filters)
540* changed .so versioning from .so.13.0.0 to .so.0.0.14
541  (best is to remove all old libs before installing)
542* added updated MacOSX ProjectBuilder file (thanks Brian)
543* added info on MacOSX 10.3 build
544* added mingw (on cygwin) makefile (thanks Brian)
545* added Dev-Cpp makefile (thanks Sebastian)
546* removed some unused variables from gfx and rotozoom code (thanks Thi)
547* fixed a non-critical typecast mistake (thanks Thi)
548* converted all C++ comments to C comments in SDL_imageFilter
549
550
551Ver 2.0.13 - Tue Dec 21 08:41:25 EST 2004
552* changed include back to "SDL.h"
553* compile fixes for OSX fink  (thanks (Michael)
554* compile fixes for gcc3.4 (thanks Dries)
555* support vertical and horizontal flipping of axis in new
556  rotozoomSurfaceXY function (thanks Victor)
557* updated TestRotozoom program
558
559
560Ver 2.0.12 - Mon Aug 30 09:04:11 EDT 2004
561* piecolor naming fix
562* primitive API change to 'filledPie'
563* introduction of some const variables
564
565
566Ver 2.0.11 - Thu May 13 09:42:34 EDT 2004
567* added pieRGBA/pieColor primitive (non filled pie)
568* added QNX6 build patch
569* use $(includedir)/SDL to automake setup
570* updated README
571* added 2x2 box &amp; pie tests
572* added dynamic font setup routine
573* added sample font files to the Fonts directory
574* added font test program
575* string routines changed to use const char
576* fixed TestRotozoom clear color bug
577
578
579Ver 2.0.10 - Thu Dec 11 09:40:08 EST 2003
580* Updated "missing" script to newer version to avoid build errors
581* Fixed filled polygon int32 overflow error in calculation
582* Updated RPM spec file for new website path
583* Added micro version number to .h file
584
585
586Ver 2.0.9 - Mon Oct 27 10:03:18 EST 2003
587* Fixed "filled-box width too small by 1 bug" for A=255
588* Wrong versioning in .h file
589
590
591Ver 2.0.8 - Wed Jul 16 16:18:13 EDT 2003
592* Modified filledPolygon drawing
593  (The edges of a filled polygon and a polyline were
594   reported to not intersect correctly. With this fix, the
595   edges do still do not intersect 100% due to the difference
596   in the algorithms. But now a polygon will never draw
597   outside of the area enclosed by a polyline.)
598
599Ver 2.0.7 - Sun Jun  8 08:17:38 EDT 2003
600* Added MacOS X Project Builder code
601* changed SDL include to &lt;SDL/SDL.h&gt;
602* Added bezier curve
603
604
605Ver 2.0.6 - Sat May 25 15:12:17 EDT 2002
606* Fixed clipping code for most primitives
607* Added clipping code for character
608* Added VC7 project file
609
610
611Ver 2.0.5 - n/a
612* Removed some unused code
613
614
615Ver 2.0.4 - Sat Feb  9 22:09:45 EST 2002
616* Fixed rectangle drawing bug on edges for A&lt;255
617* Added trigons (triangles) as wrapper calls to polygon.
618
619
620Ver 2.0.3 - Sat Jan 26 10:06:16 EST 2002
621
622* Zipped VisualC directory to avoid EOL problems.
623* Fixed aalineColor call (y2 parameter was y1).
624* Fixed rotozoom bug that caused black or undefined pixels on edges.
625
626
627Ver 2.0.2 - Sat Jan 19 21:41:28 EST 2002
628* Removed dependency from GL libraries during compile.
629* Added VisualC makefile.
630
631
632Ver 2.0.1 - Sat Jan  5 22:08:17 EST 2002
633
634* New better quality aacircle/aaellipse code
635* Better locking optimization for a 4-8% speed improvement on some
636  primitives (line, aaline, circle, ellipse)
637
638
639Ver 2.0 - Sat Dec 29 16:27:57 EST 2001
640
641* Initial release of SDL_gfx based on SDL_gfxPrimitives and SDL_rotozoom
642  code.
643* Added framerate code and testprogram.
644* Added imageFilters code and testprogram.
645* New distribution: source code, README, configure system etc.
646
647
648Previous versions
649=================
650
651SDL_gfxPrimitives:
652------------------
653
654Ver 1.5 - Mon Jul  2 11:27:40 EDT 2001
655
656* New alpha blending code for factor 4 speedups if a&lt;255 on all functions.
657* Modified include file for W32 DLL support.
658* Added VC6 project files for DLL and static library building.
659* Added simple AA-circle/-ellipse routine - quality needs improvement.
660* Removed 32bit shift on 64bit number from aaline for better portability
661  across platforms.
662* Removed a couple more compiler warnings (i.e. purely cosmetic fix).
663
664Ver 1.4 - Sun Jun  3 11:52:07 EDT 2001
665
666* Fixed hline, vline and rectangle clipping and result codes.
667* Fixed AA-line arithmetic (was alpha subtraction, should be alpha ratio).
668* More caching on fonts for speedups.
669* More pointer checks in several places.
670* New special cases for ellipses for rx=0/ry=0.
671* Same sanity checks for circles/ellipses.
672* Same return code for polygon/filledpolygon.
673
674Ver 1.3 - Thu May 31 12:41:35 EDT 2001
675
676* Minor cleanups and fixes (gcc -Wall is your friend).
677
678Ver 1.2 again - Thu Apr  5 07:50:57 EDT 2001
679
680* Fixed lineRGBA and aalineRGBA calls (had coordinate-passing mixed up twice,
681  thanks Lion for pointing this out)
682
683Ver 1.2 - Wed Apr  4 08:32:42 EDT 2001
684
685* Changed to a dual, you-have-the-choice(TM) licencing system
686  to accomodate GPL developments using SDL_gfxPrimitives.
687* Some minor fixes (thanks Karl).
688* All routines return proper result code now.
689* Clipping for aaline, circle and ellipse.
690
691Ver 1.1 - Thu Mar 22 15:28:27 EST 2001
692
693* Added code for Alpha=255 pixel drawing through direct memory writes to all routines
694resulting in a much faster performance (factor 5 to 20) for non transparent pixels.
695* New test and benchmark program with better info and nicer look.
696* More info in README. Proper licence file. Comment cleanup.
697
698Ver 1.0 - Fri Mar 16 08:38:07 EST 2001
699
700* Initial release
701
702
703SDL_rotozoom:
704-------------
705
706Ver 1.6 - Mon Nov 19 21:19:26 EST 2001
707* Added interpolation to alpha channel (simplifies code)
708* Ran the sourcecode through 'indent' for better readability
709
710Ver 1.5 - Sat Jul  7 13:02:07 EDT 2001
711* Added project files (VisualC.zip) and modifications for VC project building.
712* Fixed old versioning in configure.in file.
713* Fixed LICENSE file and LGPL source reference.
714
715Ver 1.4 - Mon Jun  4 12:15:31 EDT 2001
716* Removed SDL_SoftStretch call again in favour of an internal zoom routine.
717* Added new zoomSurface() function with seperate X and Y zoom factors.
718
719Ver 1.3 - Thu May 31 08:37:36 EDT 2001
720* Modified code to handle RGBA or ABGR source surfaces transparently.
721* More error checking, source surface locking.
722* Slighly expanded test program with event handling.
723
724Ver 1.2 - Wed May 30 18:18:05 EDT 2001
725* Fixed the completely broken 32bit routine's pointer arithmetic.
726* Uses SDL_SoftStretch in certain cases (angle=0, smooth=0).
727* Convert source surface on the fly if not 8/32bit.
728* Added license file - was empty before (duh).
729
730Ver 1.1 - Wed May 23 15:04:42 EDT 2001
731* Added automake/autoconf scripts and testprogram.
732
733Ver 1.0 - Fri Mar 16 08:16:06 EST 2001
734* Initial release
735
736</pre></div> </div></div><!-- contents -->
737
738
739<hr class="footer"/><address class="footer"><small>
740Generated by &#160;<a href="http://www.doxygen.org/index.html">
741<img class="footer" src="doxygen.png" alt="doxygen"/>
742</a> 1.8.0
743</small></address>
744
745</body>
746</html>
747