cairo (graphics)

The cairo graphics library logo.
Original author(s) Keith Packard, Carl Worth[1]
Developer(s) Carl Worth, Behdad Esfahbod
Stable release 1.12.14 / February 10, 2013; 2 months ago (2013-02-10)
Preview release None
Written in C
Operating system Cross-platform
Type Graphics library
License GNU Lesser General Public License version 2.1 (only) or Mozilla Public License 1.1
Website cairographics.org

Cairo is a software library used to provide a vector graphics-based, device-independent API for software developers. It is designed to provide primitives for 2-dimensional drawing across a number of different backends. Cairo is designed to use hardware acceleration[2] when available.

It is written in C and has bindings available for many programming languages, including C++, PHP, Factor, Haskell, Lua, Perl, Python, Ruby, Scheme, Smalltalk and several others.[3]

Cairo is free software. The majority of it is Dual licensed under the GNU Lesser General Public License and the Mozilla Public License, though some parts of it are licensed only under the GNU General Public License.

History

Keith Packard and Carl Worth founded the cairo project for use in the X Window System.[4] It was originally (until at least 2003) called Xr or Xr/Xc. The name was changed to emphasize the idea of a cross-platform library, not tied to the X server.[5] The name cairo derives from the original name Xr, interpreted as the Greek letters chi and rho.[6]

↑Jump back a section

Backends

Cairo supports output to a number of different backends, known as "surfaces" in its code. Backend support includes output to the X Window System, Win32 GDI, Mac OS X Quartz, the BeOS API, OS/2, OpenGL contexts (directly[7] and via glitz), local image buffers, PNG files, PDF, PostScript, DirectFB and SVG files.

There are other backends in development targeting the graphics APIs OpenVG,[8]Qt,[9]Skia,[10] and Windows' Direct2D.[11]

↑Jump back a section

Notable usage

Cairo is popular in the open source community for providing cross-platform support for advanced 2D drawing.

  • GTK+, starting in 2005 with version 2.8, uses cairo to render the majority of its widgets.[12] Since GTK+ version 3, all the rendering is done using cairo.
  • The Mono Project,[13] including Moonlight,[14] has been using cairo since very early in conception to power the backends of its GDI+ (libgdiplus) and System.Drawing namespaces.
  • The Mozilla project has made use of cairo in recent versions of its Gecko layout engine, used for rendering the graphical output of Mozilla products. Gecko 1.8, the layout engine for Mozilla Firefox 2.0 and SeaMonkey 1.0, used cairo to render SVG and <canvas> content. Gecko 1.9,[15] the release of Gecko that serves as the basis of Firefox 3, uses cairo as the graphics backend for rendering both web page content and the user interface (or "chrome").
  • The WebKit framework uses cairo for all rendering in the GTK+ and EFL ports. Support has also been added for SVG and <canvas> content using cairo.
  • The Poppler library uses cairo to render PDF documents. Cairo enables the drawing of antialiased vector graphics and transparent objects.
  • The vector graphics application Inkscape uses the cairo library for its outline mode display, as well as for PDF and PostScript export since release 0.46.[16]
  • MorphOS 2.5 features a shared library implementation of cairo, which was available as stand-alone release for earlier MorphOS versions.
  • AmigaOS 4.1 supports a shared object library of cairo (libcairo.so) in its default installation.
  • FontForge enabled cairo by default for rendering in mid-October 2008.
  • R can output plots in PDF, PostScript and SVG formats using cairo if available.
  • Gnuplot 4.4 now uses cairo for rendering PDF and PNG output.[17]
  • Internet Browser for PlayStation 3 uses cairo since system software update 4.10.
↑Jump back a section

References

  1. ^ http://cworth.org/~cworth/
  2. ^ "Cairo homepage". Retrieved 2010-10-30. 
  3. ^ Language bindings
  4. ^ "Xr: Cross-device Rendering for Vector Graphics". Retrieved 2009-06-08. 
  5. ^ "Mailing list thread about the cairo name change". Retrieved 2009-06-08. 
  6. ^ "Mailing list thread about the cairo name change". Retrieved 2006-12-02. 
  7. ^ Chris Wilson (2009-07-22). "New OpenGL backend merged". Retrieved 2010-02-12. 
  8. ^ Øyvind Kolås (2008-01-24). "Announcing OpenVG backend". Retrieved 2010-02-12. 
  9. ^ Vladimir Vukićević (2008-05-06). "Well Isn’t That Qt". Retrieved 2010-02-12. 
  10. ^ Chris Wilson (2009-08-31). "Cool Stuff". Retrieved 2010-02-12. 
  11. ^ Bas Schouten (2009-11-22). "Direct2D: Hardware Rendering a Browser". Retrieved 2010-02-12. 
  12. ^ "GTK+ to Use Cairo Vector Engine". Retrieved 2009-12-27. 
  13. ^ "Mono - Drawing". Retrieved 2009-12-27. 
  14. ^ "Moonlight Notes". Retrieved 2009-12-27. 
  15. ^ "Gecko 1.9 Roadmap". Retrieved 2009-12-27. 
  16. ^ "ReleaseNotes046". Inkscape Wiki. Retrieved 2008-03-31. 
  17. ^ "Gnuplot version 4.4.0 announcement". Gnuplot homepage. Retrieved 2011-02-22. 
↑Jump back a section
Last modified on 12 April 2013, at 04:09