Wednesday, 12 September 2012

PyCairo 01

This script shows how to draw simple graphics with Cairo in PyGtk. The following techniques are adopted:

  1. Cairo for graphics.
  2. Draw lines.
  3. Draw rectangles.
  4. Draw circles.
  5. Draw text.
  6. Save the result to a SVG file.

Output


A file named d01.svg will be generated by this script on the same directory holding the script, it holds the following diagram.


Source Code


No comments:

Post a Comment