Introduction to 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. Experimental backends include OpenGL, Quartz and XCB file output. Cairo is designed to produce consistent output on all output media while taking advantage of display hardware acceleration when available (e.g., through the X Render Extension). The Cairo API provides operations similar to the drawing operators of PostScript and PDF. Operations in Cairo include stroking and filling cubic Bézier splines, transforming and compositing translucent images, and antialiased text rendering. All drawing operations can be transformed by any affine transformation (scale, rotation, shear, etc.).

This package is known to build and work properly using an LFS-7.9 platform.

This package is known to build properly using the gcc-6 compiler.

Package Information

Cairo Dependencies


libpng-1.6.22 and Pixman-0.34.0



Cogl-1.22.0, GTK-Doc-1.25, libdrm-2.4.68, LZO-2.09, Mesa-11.2.2, Qt-4.8.7, Valgrind-3.11.0, DirectFB, jbig2dec, and Skia

User Notes:

Installation of Cairo

Install Cairo by running the following commands:

./configure --prefix=/usr    \
            --disable-static \
            --enable-tee &&

This package does not have a working testsuite.

Now, as the root user:

make install

Command Explanations

--enable-tee: This switch enables experimental tee surface backend which is required if using system-installed Cairo with Mozilla applications.

--disable-static: This switch prevents installation of static versions of the libraries.

--enable-xlib-xcb: This switch enables experimental Xlib/XCB functions used by some window managers.

--enable-gl: This switch enables Cairo's experimental OpenGL surface which is required for Wayland compositor and some other packages that are not part of BLFS.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.


Installed Programs: cairo-sphinx and cairo-trace
Installed Libraries:, and
Installed Directories: /usr/{include,lib,share/gtk-doc/html}/cairo

Short Descriptions


is an internal utility for regression analysis.


generates a log of all calls made by an application to Cairo.

contains the 2D graphics functions required for rendering to the various output targets.

contains functions that integrate Cairo with GLib-2.48.0's GObject type system.

contains the script interpreter functions for executing and manipulating Cairo execution traces.

Last updated on 2016-05-07 15:01:40 -0500