Primitive Generator, SPriG, is a free and open source C/C++ library
that does three main things:
primitives (pixels, lines,
circles, polygons, etc.) with optional anti-aliasing, alpha-blending,
and arbitrary thickness.
||Rotates, scales, and
mirrors SDL surfaces with optional anti-aliasing and alpha-blending.
with SDL surfaces quicker and easier.
SPriG has been used on many operating systems and devices and even has a couple of bindings to other languages (like Haskell
SPriG, check out the parallel page for NFont, an excellent bitmap font
Line thickness control
Built-in 'Dirty rect'
Shapes and polygons
You can find a full
list of functions here.
The surface transform
functions have minor bugs like missing the bottom row of pixels.
Gouraud shading is direction-biased.
Alpha-blended beziers overdraw pixels.
Alpha-blending and anti-aliasing need special treatment in thick
you'd like to get involved with making SPriG better, whether you have
feature requests, suggestions, bug reports, or code to submit, check
out the Google Code page:SPriG on Google Code
Development Notes 2-23-11:
Let me know what you think of Sprig! There's a new bugfix version coming soon (thickness was broken), but you can get it right away at the Google Code page
you have any requests, suggestions, or would like to contribute a
binary package or Makefile for any specific OS, please send me an email!
|SPriG is a graphics
primitive generator for SDL. It supplies a quick and simple
interface for the drawing of primitives
(pixels, lines, polygons), the rotation
and zooming of surfaces, and many useful surface functions.
It also includes several alpha-blending modes, dirty
rectangles, and line thickness controls.
v1.0.1 - 11/27/09
|SDL_gfx is an active graphics extension for
SDL that is very popular.
[Mirror of Official
a graphics library for SDL that
provides the drawing of primitives, the rotation and zooming of
surfaces, and much more. It is not in active development.
Generic library installation guide:
Download the binary distribution for your operating system.
Copy headers (sprig.h and sprig_inline.h) to your compiler's
Copy library files (libsprig.a, sprig.lib, or
to your compiler's /lib folder.
Add library to your project's linked libraries
Include the header (#include "sprig.h").
Building from source using 'make':
Download the source distribution.
Unzip it and move into the src directory.
Run 'make', then 'make install'.
Write a program and enjoy!
For a more detailed look at installing libraries, see Graphics from Scratch,
For more info on what SPriG can do, see A Guide to Graphics with SPriG.