# cairo

> 2D vector graphics library in C with output to screens, images, PDF, PostScript and SVG

Source: https://talira.ai/catalog/cairo-y4e3tpdn
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / graphics](https://talira.ai/categories/libraries/graphics), [languages / c](https://talira.ai/categories/languages/c)
- Licence: LGPL-2.1-only OR MPL-1.1[^3]
- Pricing: Free and open source[^3]
- Pricing notes: Free software under the LGPL 2.1 or the MPL 1.1, at your option.
- Free tier: yes[^3]
- Backed by: [cairo](https://talira.ai/orgs/cairo-project.md)

cairo is a 2D graphics library written in C that draws the same way on several output targets: the X Window System (through Xlib and XCB), Quartz, Win32, image buffers, and PostScript, PDF and SVG files. Its drawing model follows PostScript and PDF, with stroking and filling Bézier paths, affine transforms, compositing translucent images and antialiased text, and it uses hardware acceleration where the display offers it. Bindings exist for many languages, among them pycairo for Python, rcairo for Ruby and cairomm for C++, and GTK draws with it. Install it from a Linux distribution (libcairo2-dev on Debian), Homebrew or MacPorts, or build it from the release tarballs with pixman.

## Links

- Website: https://cairographics.org/
- Repository: https://gitlab.freedesktop.org/cairo/cairo
- Docs: https://cairographics.org/documentation/

## Problems it solves

- draw charts and vector shapes in a C program and save them as PDF or SVG
- render the same 2D drawing to the screen and to a printable file
- produce antialiased graphics and text for a Linux desktop app

## Features

- one drawing API for X11 (Xlib and XCB), Quartz, Win32, image buffers, PDF, PostScript and SVG
- stroking and filling cubic Bézier paths, with affine transforms
- compositing translucent images and antialiased text
- uses display hardware acceleration where available, such as the X Render extension
- bindings for Python, Ruby, C++, Haskell, Lua and other languages

## Limitations

- It draws only: windows, input and widgets come from a toolkit such as GTK, or from Xlib, Win32 or Quartz directly.[^1]
- Building from source needs the pixman library as well.[^2]

## Trust

Overall: 0.27 out of 1.
Signals: backing 0.30, extensibility 0.00.

- has a company behind it

Warnings:

- activity not tracked: Talira doesn't read repositories on gitlab.freedesktop.org yet

## Sources

[^1]: https://cairographics.org/bindings/ (checked 29 Nov 2026)
[^2]: https://cairographics.org/download/ (checked 29 Nov 2026)
[^3]: https://cairographics.org/ (checked 29 Nov 2026)
