Graphics drawing primitives and other support functions wrapped up in an addon, C-based library for the Simple Direct Media (SDL) cross-platform API layer. SDL_gfx supports the original SDL1 library using software surfaces, and SDL2_gfx supports SDL2 using rendering functions.
SDL2 graphics drawing primitives and other support functions
Latest Version (Ver 1.0.1 – Sun Jun 15 2014)
(C) A. Schiffler, aschiffler [at] ferzkopp.net 2012-2015, licensed under the zlib license
SDL graphics drawing primitives and other support functions
The SDL_gfx library evolved out of the SDL_gfxPrimitives code which provided basic drawing routines such as lines, circles or polygons and SDL_rotozoom which implemented a interpolating rotozoomer for SDL surfaces.
The current components of the SDL_gfx library are:
- Graphic Primitives (SDL_gfxPrimitves.h)
- Rotozoomer (SDL_rotozoom.h)
- Framerate control (SDL_framerate.h)
- MMX image filters (SDL_imageFilter.h)
- Custom Blit functions (SDL_gfxBlitFunc.h)
The library is backwards compatible to the above mentioned code. Its is written in plain C and can be used in C++ code.
(C) A. Schiffler, aschiffler [at] ferzkopp.net 1999-2013, licensed under the zlib license
Latest Version (Ver 2.0.25 – Sun Oct 28 2013)
Current Development Version via SVN
The library compiles and is tested for a Linux target (gcc compiler) and a Win32 target (VisualC, xmingw32 cross-compiler) as well as BeOS and MacOS X PowerBuilder See README for VC and PowerBuilder compile information. When using the cross-compiler (available on the author’s homepage), the build process generates .DLLs. You can use the command line ‘LIB.EXE’ tool to generate VC6 compatible .LIB files for linking purposes.
SDL_gfx has been integrated with the following language interfaces:
- Pascal: http://www.freepascal-meets-sdl.net
- Perl: http://sdl.perl.org
- Python: http://www.pygame.org
- C#: http://cs-sdl.sourceforge.net
- Lua: http://www.egsl.retrogamecoding.org
Notes on Graphics Primitives
Care has been taken so that all routines are fully alpha-aware and can blend any primitive onto the target surface if ALPHA<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. Currently, The following Anti-Aliased drawing primitives are available:
- AA-polygon (not filled)
Please check README in archive and .h files for up-to-date interface information.