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.0
platform.
Package Information
cairo Dependencies
Required
pkg-config-0.26, libpng-1.5.7,
pixman-0.24.0, and Fontconfig-2.8.0
Recommended
X Window
System (gtk requires cairo to be built after libX11 is
installed)
Optional
GTK-Doc-1.18, DirectFB, Skia and Valgrind
Optional (to provide extended test suite coverage)
GPL Ghostscript-9.04 (to test the
postscript backend), gtk+-2.24.8 (for testing the PDF backend),
Poppler-0.14.4 (for testing the PDF backend),
libspectre (to test the PDF
backend) and librsvg-2.26.3 (for testing the SVG backend)
Note that the GTK, Poppler and librsvg packages are circular in
that using them for test suite coverage requires installing cairo
first, then installing the desired package(s), then installing
cairo again. As the test suite seems to be somewhat broken it
doesn't seem worth the effort.
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/cairo
Installation of cairo
Install Cairo by running the
following commands:
./configure --prefix=/usr --enable-tee --enable-gl &&
make
To test the results, issue: make -k
check.
Note that the tests take a long time to run and many of them fail
for unknown reasons.
Now, as the root
user:
make install
Command Explanations
--enable-gtk-doc
: Use this parameter if
GTK-Doc is installed and you wish
to rebuild and install the API documentation.
--enable-tee
: This is used by
Firefox. If you don't enable the
Cairo's tee surface back end you won't be able to build
Firefox with --enable-system-cairo
.
--enable-gl
: Enable the Cairo OpenGL back end. Remove this option if
you've not installed MesaLib-7.11.2.
--enable-xcb
: Enable Cairo's libxcb-1.7 back end.
--disable-static
: Prevent static
libraries being built and installed.
--enable-vg
: Enable the Cairo OpenVG back end (requires
MesaLib-7.11.2 installed, configured with
--enable-gallium-egl and --enable-openvg).