Perl Cairo tutorial
These pages are a tutorial by example for the Cairo Perl module.
- Fill in the background
- Draw a line
- Draw a circle
- Draw many circles in random colours
- Draw a grid
- Draw text
- Text dimensions
- Pie chart
- Stroke, preserve, and fill the path
About Cairo's documentation
Cairo is not thoroughly documented in the CPAN module. To understand Cairo's commands it is necessary to refer to the C language documentation at Cairographics.org. The links on the commands illustrated on this page go to the Cairo C manual.
The Perl interface is similar to the C interface. Function arguments go in the same order. The function names are also similar to the C ones.
A review of the Cairo module at "CPAN ratings"
This review of 'Cairo' at CPAN ratings discusses where to find its documentation.