Cairo-1.18.4

#### Beyond Linux® From Scratch (System V Edition) - Version r13.0-1374

### Chapter 25. Graphical Environment Libraries

- Prev

  at-spi2-core-2.60.6

- Next

  libcairomm-1.0 (cairomm-1.14.6)

- Up
- Home

# Cairo-1.18.4

## 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.)

### Note

This version of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable version of the System V books.

### Package Information

- Download (HTTP): https://www.cairographics.org/releases/cairo-1.18.4.tar.xz

- Download MD5 sum: db575fb41bbda127e0147e401f36f8ac

- Download size: 31 MB

- Estimated disk space required: 95 MB

- Estimated build time: 0.2 SBU (Using parallelism=4)

### Cairo Dependencies

#### Required

libpng-1.6.58 and Pixman-0.46.4

#### Recommended

Fontconfig-2.18.3, GLib-2.88.3 (required for most GUIs), and Xorg Libraries

#### Optional

ghostscript-10.07.1, GTK-Doc-1.36.1, libdrm-2.4.134, librsvg-2.62.3, libxml2-2.15.3, LZO-2.10, Poppler-26.08.0, Valgrind-3.27.1, GTK+-2, and libspectre

### Note

There is a circular dependency between cairo and harfbuzz. If cairo is built before harfbuzz, it is necessary to rebuild cairo after harfbuzz in order to build pango.

## Installation of Cairo

Install Cairo by running the following commands:

    mkdir build &&
    cd    build &&

    meson setup --prefix=/usr --buildtype=release .. &&
    ninja

This package does not have a working test suite.

Now, as the `root` user:

    ninja install

## Command Explanations

`--buildtype=release`: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

`-D xlib-xcb=enabled`: This switch enables several experimental Xlib/XCB functions used by some window managers.

`-D gtk_doc=true`: Use this parameter if GTK-Doc is installed and you wish to create and install the documentation.

## Contents

Installed Programs: cairo-trace
Installed Libraries: libcairo.so, libcairo-gobject.so, and libcairo-script-interpreter.so
Installed Directories: /usr/include/cairo and /usr/lib/cairo

### Short Descriptions

cairo-trace | generates a log of all calls made by an application to Cairo
`libcairo.so` | contains the 2D graphics functions required for rendering to the various output targets
`libcairo-gobject.so` | contains functions that integrate Cairo with Glib's GObject type system
`libcairo-script-interpreter.so` | contains the script interpreter functions for executing and manipulating Cairo execution traces

- Prev

  at-spi2-core-2.60.6

- Next

  libcairomm-1.0 (cairomm-1.14.6)

- Up
- Home