This is Cairo graphics tutorial. The tutorial will teach you the basics of graphics programming in Cairo with the C programming language. This tutorial is for beginners and intermediate developers.
Table of contents
- Introduction
- Cairo definitions
- Cairo backends
- Basic drawing
- Shapes and fills
- Gradients
- Transparency
- Compositing
- Clipping and masking
- Transformations
- Text
- Images in Cairo
- Root window
Cairo
Cairo is a library for creating 2D vector graphics. It is written in the C programming language. There are bindings for other computer languages. Python, Perl, C++, C# or Java. Cairo is a multiplatform library. It works on Linux, BSDs, OSX.
Related tutorials
PyCairo tutorial presents the Cairo library with the Python language. You may also look at theGTK+ tutorial.
Cairo: A Vector Graphics Library
for Cairo 1.16.0
cairo_t — The cairo drawing context
Paths — Creating paths and manipulating path data
cairo_pattern_t — Sources for drawing
Regions — Representing a pixel-aligned area
Transformations — Manipulating the current transformation matrix
text — Rendering text and glyphs
Raster Sources — Supplying arbitrary image data
Tags and Links — Hyperlinks and document structure
cairo_font_face_t — Base class for font faces
cairo_scaled_font_t — Font face at particular size and options
cairo_font_options_t — How a font should be rendered
FreeType Fonts — Font support for FreeType
Win32 Fonts — Font support for Microsoft Windows
Quartz (CGFont) Fonts — Font support via CGFont on OS X
User Fonts — Font support with font data provided by the user
cairo_device_t — interface to underlying rendering system
cairo_surface_t — Base class for surfaces
Image Surfaces — Rendering to memory buffers
PDF Surfaces — Rendering PDF documents
PNG Support — Reading and writing PNG images
PostScript Surfaces — Rendering PostScript documents
Recording Surfaces — Records all drawing operations
Win32 Surfaces — Microsoft Windows surface support
SVG Surfaces — Rendering SVG documents
Quartz Surfaces — Rendering to Quartz surfaces
XCB Surfaces — X Window System rendering using the XCB library
XLib Surfaces — X Window System rendering using XLib
XLib-XRender Backend — X Window System rendering using XLib and the X Render extension
Script Surfaces — Rendering to replayable scripts
cairo_matrix_t — Generic matrix operations
Error handling — Decoding cairo's status
Version Information — Compile-time and run-time version checks.
Types — Generic data types
A. Creating a language binding for cairo
Overloading and optional arguments