Board: A vector graphics C++ library


The Board C++ library

(Motivation for this piece of code) There are more people on this planet who are fluent in, or at least know as beginners, the C++ language than there are people who know all together the Postscript, SVG, and FIG (XFig) file formats. Actually Postscript is also a programming language, but that's part of another story.

The next point is: how can one draw a vector graphic with his favorite drawing software when this graphic involves a lot, say a huge amount of primitives, especially when the graphic would be easy to build using loops, variables, functions. Eventually, one may enjoy being able to code the drawing in C++ and then export it as an EPS file for inclusion in LaTeX document, as an XFig file for further editing with Xfig, or as an SVG file that may be augmented/edited with any SVG drawing tool.

Features

For now, Board can handle primitives like lines, rectangles, triangles, polylines, circles, ellipses and text.

In future releases, bitmap insertion should supported.

See the TODO file for a list of features that should be added in future releases.


Sample programs using the Board library

The Board logo

This program draws the Board logo.

Source code: example1.cc

Output files: draw1.svg, draw1.eps, or draw1.fig.

Simple drawing with transparency

Drawing with several primitives. (Note that the transparency is handled only with SVG files.)

Source code: example2.cc

Output files: draw2.svg, draw2.eps, or draw2.fig.

Arithmetic coding illustration

Source code: arithmetic.cc

Output files: arithm.svg, arithm.eps, or arithm.fig.

A CImg example

A sample program distributed with the CImg library, which uses Board to achieve vector rendering of 3D primitives.

Source code: toolbox3d.cpp

Output files: scene.svg, scene.eps, and scene.fig.

Documentation

Download

  • Before downloading, you may have a look at the CeCILL Licence version 2 for this piece of code. This licence is GNU GPL compatible.
Sourceforge download section

Click here to go to the download section on the Sourceforge server.

Version 0.8.0

libboard-0.8.0.tar.gz [Source code tarball]
libboard-dev_0.8.0_i386.deb [Debian binary package (including header files)]

Author

     

 

Hosted by SourceForge.net Logo