FLTK Imago

Imago logo vector image

Imago logo vector image

Welcome. Imago aims to be a set of advanced imaging extensions for FLTK. This first release adds basic SVG (Scalable Vector Graphics) image support. SVG is similar to Postscript or PDF except it is based on an XML file format with optional gzip compression. Take a look at the specifications if you are interested in learning more.

Imago uses Cairo and other supporting libraries from the freedesktop.org project to supply the underlying SVG drawing support. Currently these libraries are in heavy development and need a lot of improvement before they will be fully usable.

Imago adds two new classes to the 1.1.x series of FLTK. “Fl_SVG_Image” works similar to the other image classes in FLTK, and “Fl_SVG_Button” makes it easy to create custom buttons that are based on SVG images.

Green arrow vector image

Orginally I developed this to make it easy to create fully scalable interfaces. I am currently using it for development of kiosk systems, TV and media systems, and applications for controlling hardware where I want the application to look similar to the hardware it is controlling.

There are a few things that might be interesting to add to this library. The ability to actually create the GUI in SVG might be fun. This would mean that all the buttons and controls would be defined inside the SVG file. Font access via SVG would also be useful. That would be future functionality though.

In the downloads section you can find the source. The Imago source is released under the same license as FLTK (LGPL with static link exception). Also inside the full source download are several other libraries needed to make everything work. All of those libraries have either BSD-style or LGPL licenses. I have tweeked many of these libraries so that they compile and work on all the platforms (eg. Windows). I have also compiled shared and static binaries for Linux, Windows, and MacOS. Using the libfltk_imago binaries is probably the easiest method to start using the new functionality. Compiling everything from source can be complex due to all the libraries required. However, I have tried to make it simple. There are autoconf/Makefiles and a Visual Studio solution for building on the various platforms.

For an excellent free SVG drawing program, take a look at Inkscape.

Screenshots of FLTK Imago test application (Linux, Windows, MacOS X):


6 responses to “FLTK Imago”

  1. We could actually put your code into libfltk_svg, and if you want, and FLTK team agrees, you can maintain that part of FLTK project. P.S. FLTK 2.0 has already support for cairo. By default it uses Xft so it should be pretty easy to do this without cairo/fontconfig sources.

  2. That could work. To be honest, I haven’t followed the development of FLTK 2.0 since it seems to change radically every few years anyway. 😉 Cairo would still be needed on Windows and MacOS though, unless they are included with FLTK and work on those platforms already.

Leave a Reply

Your email address will not be published. Required fields are marked *