cairo samples

 arc
 arc_negative
 clip
 clip_image
 curve_rectangle
 curve_to
 fill_and_stroke2
 fill_and_stroke
 gradient
 image
 imagepattern
 libsvg
 operator_add
 operator_atop
 operator_atop_reverse
 operator_in
 operator_in_reverse
 operator_out
 operator_out_reverse
 operator_over
 operator_over_reverse
 operator_saturate
 operator_xor
 path
 set_line_cap
 set_line_join
 text_align_center
 text
 text_extents
 xxx_clip_rectangle
 xxx_dash
 xxx_long_lines
 xxx_multi_segment_caps
 xxx_self_intersect

This page contains samples of cairo's rendered output and the code snippets used to create them.

The user space is the unit square ( (0,0) - (1, 1) ). The snippets are meant to be short, and easy to understand

cairo_snippets, part of the cairo-demo module in cairo CVS, is used to create these webpages, cairo_snippets serves as a testbed for the rendered output of various cairo backends, the images rendered on these webpages uses the cairo_snippets_png program, which is backend by the software image backend.

The snippet enviroment, and the original snippets were originally created by Øyvind Kolås for a paper submitted to GUADEC 2004.

All snippet code is considered to be part of the public domain, since it is instructional material.

A page with all snippets is also available