Contents
About mfGraph Library
mfGraph is a graph rendering library for interactive applications. Written in C++ and Python, mfGraph parses GraphViz DOT and XDOT files and provides rendering and hit-testing facilities. Supports Microsoft Windows natively, GNU/Linux through wxPython.
Target Audience
This is the kind of client application I had in mind when writing the mfGraph library:
- An application that needs to visualize data using graphs (not so much a "graph editor", i.e., something like Visio or UML modelling software, but not excluding this kind of application either)
- An application that needs automatic layouting capabilities
- An application in which the user interacts with the graph (e.g., the user clicks an edge to view details about the network connection that it represents)
- A Microsoft Windows application or a wxPython application
Features
mfGraph Features:
- An object model for manipulating graphs and their attributes
As a serialization format, the GraphViz DOT language is used
- The DOT tool can be used to calculate the layout, then mfGraph is used to build a list of primitive drawing commands by interpreting the XDOT attributes
- For each platform, all that is needed are basic drawing functions (text, lines, ellipses, Bezier curves, and the like) to do the actual rendering
- Zooming and hit-testing are supported
Related Libraries
I started the mfGraph project because I did not find an existing library or application that suited all my needs:
- Of those libraries that contain a DOT parser, none interprets the XDOT drawing commands
Some libraries are using AT&T's original DOT parser, which is distributed under a license that is incompatible with the GNU GPL
- None of the libraries targets wxPython
Many applications that use GraphViz merely display graphs as bitmaps; they do not know which pixel on the screen corresponds to which graph primitive
Project Progress
This has already been implemented:
- C++ part
- Windows: GDI rendering, MFC integration, and a VCL component for C++Builder
- wxPython: Demo "graph viewer" application
This needs to be done:
- Write a class "wxMfgraph" derived from wxWindow, similar to the already written VCL component; integrating graph rendering capabilities should be possible with less than 10 lines of code
- Sort out differences between wxPython on Windows and wxGTK
- Keep the library up-to-date with new versions of the supported platforms/libraries
Find ways to share code with the wxWidgets and KGraphViewer projects
Project Details
Technical Details:
License: |
|
Programming languages: |
C++, Python |
Additional packages used: |
Flex, Bison, SWIG |
GUI libraries: |
Microsoft Windows is supported natively; wxPython |
Actively supported compilers: |
GCC (build: Automake/Autoconf), Visual C++, Borland C++Builder |
Actively supported platforms: |
Windows, GNU/Linux |