|
|
Subscribe / Log in / New account

LWN.net Weekly Edition for May 6, 2004

The Grumpy Editor's guide to diagram editors

Let it be said up front: your editor is not an artist. He is, however, given to the creation of simple diagrams for the explanation of data structures, algorithms, etc. [Diagram example] See, for example, the diagram to the right, which comes from the kobject introduction in the Driver Porting Series. These images can be a useful form of hand waving when complex subjects are being discussed.

Back in the Golden Age of Proprietary Unix (around SunOS 3 or 4, say), there weren't a whole lot of tools available for image editing. If you youngsters out there want to get a feel for how desperate those times could be, consider this: we often had to resort to tools like the LaTeX picture mode to create drawings in digital form. Happily, things have gotten better since then.

Things aren't enough better, however, that your editor has stopped keeping an eye out for a better tool. This article is an attempt at summarizing the current state of the art in free drawing editors. The emphasis here is very much on the creation of diagrams and technical drawings; we'll not be looking for the best tool for the creation of birthday party invitations, pneumatic science fiction art, obnoxious animated banner ads, or beautiful but incomprehensible icons. Your editor is trying to get some work done and needs a diagram editor which doesn't drive him nuts.

idraw

For the first stop, we might as well complete the history lesson. Back in the early days of X11, there were many efforts to produce The One Toolkit which would unify the desktop. Actually, that situation hasn't changed a whole lot in 15 years. One of the early efforts was a C++ framework called InterViews. InterViews failed to change the world directly, though many of its ideas and lessons have lived on in the design patterns community and in projects like Fresco.

InterViews did, however, produce a drawing tool named idraw, which, for years, was the definitive free drawing package. It combined full functionality (for the time) with a well-thought-out interface and a nice set of keyboard shortcuts. Creating drawings with idraw was a quick and painless process. idraw stored its output as PostScript files, making the drawings easy to print and the quality relatively good.

One might think that idraw's day has passed, given that the InterViews team has not produced a release in over ten years. As it turns out, however, there is a project (called ivtools) which is dedicated to the maintenance and improvement of the InterViews toolkit and associated tools. Releases are rare, but ivtools-1.0.4 came out last February. That said, the simple fact is that idraw's time has passed. This program has had little in the way of development for over a decade, it can't export to interesting image file formats, it has no concept of layers, it depends on a large toolkit that nobody uses, and it is a major unpleasant pain to install. InterViews was an important step toward where we are today, but even a grumpy editor sees the need to move beyond the 1980's and look at what is being hacked on now.

XFig

[XFig] Another tool with a long history is XFig. It shows many of the distinguishing characteristics of an early X11 program (though it actually had its start with SunView): home-brewed widgets, unique keyboard and mouse conventions, etc. It is, however, a highly capable tool. XFig supports most of the features one would expect from this sort of utility, though they can sometimes be hard to find. It has a sort of layer support (it works by assigning a numeric "depth" to every object), can export to any format one could imagine, allows the creation of libraries of customized objects, etc. XFig understands attachment points: when told to, it will stretch lines which connect objects to each other to keep those connections when an object is moved.

On the down side, XFig can only undo the most recent operation. Its keyboard shortcuts are like those of no other application, and will take some getting used to. The interface is highly modal; XFig's window includes an area saying what the three mouse buttons will do at any given time for a reason. Grouping objects, for example, requires selecting the group "tool," selecting individual objects with the left button or picking the corners of rectangles with middle button, then completing the operation with the right button. Your editor's biggest problem with XFig, however, is the quality of its image output. He might not be an artist, but he would still rather see his work rendered with nice fonts and antialiased lines. XFig's output prints nicely, but does not work as well on the web; given that XFig is oriented toward tasks like the production of complicated circuit diagrams, that is not entirely surprising.

Tgif

Tgif boasts a release history going back to 1990; recent releases appear to be coming about once [Tgif] per year. This tool resembles XFig in a number of ways; it, too, features home-brew widgets and a unique interface. Tgif does have a more conventional set of keyboard bindings, at least; Control-S will save the current file, for example. Tgif's interface includes a sort of control panel where one can spend a long time cycling through the various options (font sizes, colors, fill patterns, etc.); fortunately, the menus provide a quicker way of setting these attributes. Attachments are supported, making the rearranging of diagrams easy.

Tgif does not support layers, which is a major disadvantage. Actually, that is not quite true: it does have a "color layers" mode where each color is rendered into a separate layer. This mode may be useful for certain types of printed output, or for certain types of drawings (schematic diagrams, perhaps) where objects in different colors really should be separated. Tgif also allows drawings to have multiple pages; among other things, these can be used to create animated GIF images. Your editor would gladly trade both capabilities for a decent layering mechanism.

Tgif has a set of image editing functions that might have been better left to the Gimp. What it does not have, alas, is antialiased image output. Actually, exporting to images is strange in general; one must set the "print format" to the desired image format, then "print" the diagram. The image will be created without prompting for a name, and without regard to any file which may have already existed with the chosen name. Documentation for Tgif is sparse as well.

OpenOffice.org

OpenOffice.org comes with a drawing tool which has been getting more capable over time. [OpenOffice] As one might expect, it has almost every function imaginable, including 3D effects, a library of tiled background images, attachments, etc. OpenOffice may well be the only free drawing editor which performs spell-checking. It supports layers, though the interface to layers is clunky at best. Your editor must confess that OpenOffice tends to drive him nuts. It can reset drawing attributes at unexpected times, it never remembers what image format you exported to, and it is generally not the fastest application on the processor. OpenOffice is a sort of Swiss Army Knife; it can perform almost any function, but, for any given function, it tends not to perform as well as a more focused tool.

OpenOffice will export to an unbelievable number of formats, including (perhaps uniquely) PDF. When your editor exported to PNG, however, he got the same old jagged lines. OpenOffice also exports a full page image, while most other drawing editors will create an image which fits the drawing.

All of the above notwithstanding, OpenOffice.org's editor is a worthwhile addition to the Linux desktop.

Karbon14

Once upon a time, KDE had a program called Killustrator. The name ran into trademark problems, which were circumvented by renaming the tool "Kontour." [Karbon14] But then the developers stopped working on Kontour, and that problem proved harder to get around. So now, instead, the KDE project is pushing a tool called Karbon14; it can be found in KDE 3.2.

Karbon14 appears to be aimed at more artistic uses; it thus lacks some of the features (snap to grid, attachments, arrow drawing) which are useful for diagram creation. On the other hand, it has tools for drawing gradients and drop shadows, as well as more dubious features like the "star" and "spiral" tools. Karbon supports layers, but seems to want to put every object into its own layer. It has a multi-level undo feature. There is also a plugin mechanism for the addition of special effects.

Unfortunately, what Karbon14 also has is lots of bugs. Your editor, who tried both the Fedora Core 2 Test 3 and Debian unstable builds, found the tool easy to crash. The "zoom tool" can put it into an infinite loop. Drawing polylines can produce hallucinogenic results. Text drawing was never seen to work on either system. An attempt to export to PNG yielded a solid black image - that is one way to get rid of aliasing problems, but the results are not very helpful for web publication.

In all fairness, one should note that Karbon14 is currently at version 0.1. This tool has the potential to evolve into a capable, highly-featured drawing editor. But it's not yet ready for a grumpy editor's desktop.

Dia

[Dia] GNOME's entry in the diagram editor category is dia. This tool, currently at version 0.93 (released without fanfare on May 1), has been no stranger to obnoxious bugs in the past, but it has stabilized nicely over the last year or so. It is, at the moment, your editor's diagram editor of choice.

Dia is clearly oriented toward the creation of diagrams. It has snap-to-grid, layers, attachments, and several libraries of objects for schematics, flowcharts, UML diagrams, etc. On the other hand, it lacks gradient editors, 3D swirl generators, shadows, and fancy background clip-art. Dia does beautiful antialiasing, both on-screen and in image exports. On the other hand, control of object attributes is inconsistent and sometimes hard to find. Rectangle filling is controlled by double-clicking on the rectangle tool icon; control of arrowhead dimensions is, instead, obtained by selecting "details" at the end of a long list of possible arrow types. Alignment and grouping operations require navigating through a series of cascading menus; some keyboard shortcuts would be nice here.

Dia also has a reasonably comprehensive set of configuration options, which is always a nice surprise in a GNOME application. For example, it is possible to turn off the "switch back to the select tool after every operation" mode that seems to be so popular in modern interfaces, but which your editor finds obnoxious. Dia features a Gimp-style right-button menu which provides access to everything, but that menu can be replaced with a toolbar by tweaking the appropriate preference.

In conclusion...

A few other packages are worth a quick mention:

  • Xdraft looks like an attempt to make a serious free drafting application. Unfortunately, it also looks like it has gone idle over the last year.

  • Sodipodi is a well-advanced vector drawing package. It is aimed more at artists than creators of cheap diagrams, however, so it has not been reviewed in detail here.

  • If you wander deeply enough into the Gimp's menus, you'll find GFig, which appears to be an attempt to graft some vector drawing operations into that utility. GFig may work for adding certain effects to images, but it still doesn't turn the Gimp into a drawing editor; the Gimp has many strengths, but this is not one of them.

As this survey shows, the free software community offers a wealth of diagram editing tools. Many of them have reached a reasonable level of maturity though, like people, they are aging in different ways. These applications are seeing substantial development and are evolving quickly. Before long, the community should have some of the best tools available anywhere. Grumpy creators of hand-waving diagrams everywhere should rejoice.

Comments (58 posted)

Fighting software patents: a report from Brussels

May 5, 2004

This article was contributed by Tom Chance.

"Power to the Parliament" is not a typical slogan for any demonstration, but when the demonstrators are predominantly young businessmen and programmers, you can be sure something new is happening. In response to legislation concerning software patents, hackers and entrepreneurs across the EU, and in nations just joining the EU, have come together first to convince Parliament of their cause, and now to defend Parliament against the European Commission and Council. Last week saw a demonstration and a series of conferences that mark a watershed in the political organization and awareness among the members of this new movement; GNU/Linux user groups, hackers from MPlayer, consultants from MySQL, activists from the FFII, UKCDR, APRIL, FSF Europe and more hackers, journalists and bemused bystanders met to talk not about code but about politics, and without any trolls in sight.

First, a little background for context. Last year saw the Foundation for a Free Information Infrastructure's (FFII) campaign against software patents take center stage in the hacker world as the European Parliament began to debate the issue. After frenzied lobbying in late August and September, an amended piece of legislation was passed, explicitly banning software patents.

But the victory was short-lived, as the European Council and Commission took the bill and published their interpretation, removing all of the amendments the anti-software patent activists fought so hard for. A lot of EU legislation goes through this sort of complex procedure, known as "co-decision", where the legislative and executive branches both develop the legislation.

On the morning of Wednesday, April 14, a demonstration launched two days of protests and discussion to counter the Council and Commission's position. The demonstration itself was a visual but low-key event, with between 500 and 800 people marching around Brussels with yellow balloons, banners and a few sandwich boards. The march culminated with a pantomime outside the European Commission, satirizing the Commission's tendency to listen to big business (principally Nokia) rather than Small and Medium Enterprises and individuals; there was also a human chain and an en-mass balloon release.

Almost as soon as it had finished, we entered the European Parliament for the conference on software patents, organized by the FFII and the International Institute of Infonomics. The purpose of the conference was to bring key activists, MEPs and experts together to continue the discussion of software patents in Europe, and to try to measure the effects of the two competing legislations (Parliament's and the Council's).

The first panel, discussing "Recent Developments in Granting and Use of ICT Patents", gave software patent experts, business owners and activists a chance to clarify the extent of patent granting and the effects it has already had on business in Europe. The presentations were informative, though not controversial for the majority of the participants; they indicated that approximately 20,000 software patents have been granted in Europe, and that, though unenforceable, they have already done considerable damage to many small businesses. Most of the problems seemed to be caused by companies needing to file software patents as a means of defense against litigation, and to counter other companies' patent portfolios.

The second panel, discussing "EU Legislation Benchmarking: Parliament's vs Council's version of Software Patent Directive" was perhaps more interesting. Sitting next to anti-software patent law scholars and activists were representatives from the European Commission and the European Patent Office (EPO). The law scholars and activists described, from an academic rather than a pragmatic point of view, why software is un-patentable, and why the software industry doesn't even need them. Then we listened to the EPO claim that they didn't file any software patents, and that they saw the legislation as a clarifying exercise, and the Commission claim, with little substantial argument or empirical evidence, that their legislation would help the industry. Commission representatives also implied, amazingly, that the legislative process in this case ought to aim to settle the issue soon rather than take the time to approach the problem more carefully.

The third and final panel discussed "Competitivity of Knowledge Economies", and gave MEPs and economists the chance to present their views on where software patents lie in the broader picture of Europe's "ICT economy". Moving away from arguments about software patents per se, they presented various analyses of how European industry might lose out in the future if software patents were introduced.

The next day, we attended a second conference, organized by the FFII and the Green-EFA Alliance, focusing on the place of free software in Europe in general. The day opened at 9am with a series of presentations from GNU/Linux User Groups (G/LUGs) from around Europe, explaining to the many MEPs, Parliamentary assistants and other outsiders what G/LUGs are, what they do, what free software is, and how the free software community works. In contrast to the previous day's conference, there was a good opportunity for discussion, and many activists got the opportunity to discuss how G/LUGs can improve their relationships with each other, and with the EU.

Following this, there was a rather anarchic installfest. Various MEPs had Mandrake Linux installed on their PCs, while the rest of the conference's participants milled around talking to each other, and in my case, phoning more MEPs for meetings.

The conference reconvened after lunch, for three more panels. The first was on "Fair Use / Copie Privée, and proved, for the geeks in the room, far more familiar. A lawyer from the EFF, Jon Lech Johansen (DeCSS) and a lawyer from Test-Achat, a Belgian civil rights group, discussed with the floor the state of "fair use" law within the EU, touching on DVDs, audio CDs and DRM in general. Aside from general discussion, we were treated to a brief exchange between the EFF and a person defending Blizzard's case against bnetd.

The second and third panels continued in much the same vein, discussing free and open source software in Europe. The afternoon produced a growing consensus that we ought to be pushing for Free Software in the public sector across Europe far harder, and seemed to bolster the support from MEPs. By the end of the conference, most seemed considerably more excited by the future than before.

But aside from the many discussions, it is important to ask: what did the two days achieve? We cannot defeat the European Commission and Council over software patents, and place Free Software at the heart of Europe's ICT economy, with words alone. Fortunately, though no major tangible breakthroughs were made, the community came away with a lot of substantial work done, and some good plans for the future.

G/LUGs across Europe, through Eurolinux and the FFII's mailing lists, will be drafting strategies to work together to promote Free Software more effectively, drawing on each others' successes. A first draft of such a document was written during the conference, and translated into two or three languages by willing hackers. The FFII is now leading a project tentatively called the MEP Toolbox, to develop a comprehensive database of MEP's positions on important digital rights issues, and an accompanying lobbying guide for inexperienced hackers. And, as a personal measure of its success, during the recent Linux User & Developer Expo in London, the FFII-UK, the UKCDR and the AFFS got their heads together (one of which being mine) to work out a more effective strategy of cooperation and campaigning.

So long as the enthusiasm can be maintained, and promises and ideas developed in Brussels can be turned into concrete deeds, the future in Europe certainly looks a lot brighter than it did a few weeks ago. We may have the beginnings of a Europe-wide movement that can effectively tackle digital rights issues, and push Free Software. We just need to ensure we don't renege on our promises.

Comments (12 posted)

Page editor: Jonathan Corbet

Inside this week's LWN.net Weekly Edition

  • Security: 82% of email is spam; New vulnerabilities in eterm, kolab, lha, libpng, mc, proftpd, rsync, samba, sysklogd, ...
  • Kernel: 2.6 swapping; Filtered wait queues.
  • Distributions: OpenBSD 3.5: a Peek at the Other Open Source UNIX; New: APAWS Linux, ariane, Ewrt, tinysofa, Tkfp Live; College Linux 2.5 reviewed
  • Development: Eclipse brings WebTools back to life, new versions of ALSA, Samba, Firestarter, MediaWiki, Rhythmbox, Sweep, PythonCAD, JGraph, COnfigurator for Gnome, Glade, Thunderbird, MusE, Gnumeric, KOffice, OpenOffice.org, Epiphany, Mono beta, gnome-gcj, STAF.
  • Press: Testing Methodologies, Plugging Application Holes, the Importance of Linux, SCO answers IBM's counterclaims and cuts jobs, Google IPO, Reboot faster with kexec.
  • Announcements: Green Hills FUD, NRF trashes SCO suit, X Developer's Meeting coverage, KDE Community World Summit Registration, OldLinux.org.
Next page: Security>>

Copyright © 2004, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds