LWN.net Logo

The Cairo Project reaches a new milestone

By Forrest Cook
April 15, 2008

The cairo project is producing a cross-platform universal vector graphics library:

[cairo]

Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL (through glitz), Quartz, and XCB. Cairo is designed to produce consistent output on all output media while taking advantage of display hardware acceleration when available (eg. through the X Render Extension).

Cairo is used by the GNOME and desktop environment and some KDE applications. The Wikipedia article on cairo has more background information on the project. LWN investigated cairo back in August, 2005 at the time of the 0.9.0 release. Progress on cairo has been steady since then, with releases coming out frequently.

Major version 1.6.0 of cairo was recently announced:

This is a major update to cairo, with new features and enhanced functionality which maintains compatibility for applications written using cairo 1.4, 1.2, or 1.0. We recommend that anybody using a previous version of cairo upgrade to cairo 1.6.0.

A list of the major changes in cairo 1.6.X includes:

  • The pdf generation has been greatly improved, the number of rasterized image fallbacks has been greatly reduced.
  • The PostScript and PDF output code have had a number of efficiency and portability improvements.
  • The pixman library has been split out so that it can be shared by cairo and the X server.
  • Cairo 1.6.X now supports arbitrary X trueColor and 8-bit PseudoColor visuals.
  • The Mac OS X Quartz backend is now an official part of cairo and the API has been stabilized.
  • A new win32 printing backend has been added.
  • There have been a number of minor API additions to cairo.
  • Numerous "robustness fixes" have been added.
  • Other enhancements and bug fixes have been added.

As is typical with major releases, several bug fix releases quickly followed. The first was version 1.6.2 which addressed a problem with certain PostScript printers. That was followed by version 1.6.4: "The cairo community is wildly embarrassed to announce the 1.6.4 release of the cairo graphics library. This release reverts the xlib locking change introduced in 1.6.[2], (and the application crashes that it caused)." Hopefully the code will now stabilize and be adopted by the upstream applications.

Congratulations go out to Carl Worth and the other cairo developers for this major release and their continued work on this important project.


(Log in to post comments)

The Cairo Project reaches a new milestone

Posted Apr 17, 2008 7:23 UTC (Thu) by Wummel (subscriber, #7591) [Link]

Hm, where is the 1.6.3 version? Or does cairo has a version scheme with uneven numbers being development revisions? But then you usually have 1.5, 1.7 etc. for development, not 1.6.3.
I am wondering what the motivation behind the version skipping is.

The Cairo Project reaches a new milestone

Posted Apr 17, 2008 7:26 UTC (Thu) by Wummel (subscriber, #7591) [Link]

Ah, found the answer to the version question. Searching for "cairo version scheme" helped :)

The Cairo Project reaches a new milestone

Posted Apr 17, 2008 7:37 UTC (Thu) by cworth (subscriber, #27653) [Link]

The parity of the minor number (1.5 vs. 1.6) is used to indicate a
development version as opposed to a release. So that's where major new
features start landing, and where stuff can be wildly in flux, etc.

The micro number parity, (1.6.3 vs. 1.6.4), is different.

Checking out the latest cairo code from git will always give you an
odd number there, whereas taking a released tar file will always give
you an even number.

In other words, we bump the micro version number immediately before a
release *and* immediately after a release as well. We've found this
scheme extremely useful in various ways. Most importantly, we avoid
having code that's arbitrarily different from released code ever
having an identical version number. And that's a confusion well worth
avoiding.

About the only confusion this scheme ever causes is an occasional
question along the lines of "Where is the 1.6.3 version?". :-)

The Cairo Project reaches a new milestone

Posted Apr 17, 2008 14:27 UTC (Thu) by wstephenson (subscriber, #14795) [Link]

Congrats on the milestone.  But does KDE use Cairo?  As far as I know a couple of 3rd party
apps (kmplayer and ktechlab) use both KDE and Cairo, but the DE as a whole doesn't use it.


The Cairo Project reaches a new milestone

Posted Apr 17, 2008 16:39 UTC (Thu) by jriddell (subscriber, #3916) [Link]

KDE doesn't use Cairo, rather it uses Qt 4's graphics engine (Arthur).

The Cairo Project reaches a new milestone

Posted Apr 17, 2008 23:22 UTC (Thu) by JohnNilsson (subscriber, #41242) [Link]

Readres of LWN might enjoy reading this report from Alan Kay and his team on the project to
reinvent programming. One of the experiments was to implement Cairo in significantly less LoC.

http://www.vpri.org/pdf/steps_TR-2007-008.pdf

The Cairo Project reaches a new milestone

Posted Apr 18, 2008 20:38 UTC (Fri) by felixrabe (subscriber, #50514) [Link]

I started reading that paper -> very interesting so far, though I only superficially looked at actual code examples and really want to read those 200 lines of Javascript code and 500 lines of Cairo code and understand them too :) . I find it very inspiring and encouraging that there is a group of people (STEPS researchers) who think along the same lines as myself - and that currently goes something like:

  • "the desktop's dust makes me cough (GNOME/KDE and Compiz won't help that dust allergy, though I use one of them almost exclusively as my desktop), the desktop needs fundamental rethinking (Google for Humanized and/or Aza Raskin -> very insightful)";
  • "HMI'es should be so simple that they enable ordinary people to use computers and program as naturally as they use a knife to get butter on top of bread or use a door handle to open a door - just don't scare them with technical terminology and they won't even notice that what they do with computers could be called 'programming'";
  • "software should be small and fast (I admire git and Blender, though there's (always) much room for improving their intuitivity while not harming their current efficiency), because slow and big means frustration; if there wasn't so much bloat people would be more than content with sub-GHz machines (-> ecologically sensible, e.g. if you think about XO-1 and keeping old hardware around a little longer)" etc.

I hope more free software hackers will find interest in projects like STEPS and join the real bleeding edge of computer science. For me, I'm in (at least my interest :) - I study something else than CS, which has P1).

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.