Board: A vector graphics C++ library

(Exporting Postscript, SVG and Fig files.)


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 be 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

Sourceforge download section

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

Version 0.8.2

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

Version 0.8.1

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

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)]

Latest development source code (version 0.8.3)

You may get the lastest source code from the Subversion repository with the command below:

svn co https://libboard.svn.sourceforge.net/svnroot/libboard/trunk/Board Board

Author

     

 

Hosted by SourceForge.net Logo