1 Foreword
The Pycairo library is a Python graphics library based on the Cairo library. Cairo is written in C and has been ported to many other languages.
PyCairo is an efficient, fully featured, high quality graphics library, with similar drawing capabilities to other vector libraries and languages such as SVG, PDF, HTML canvas and Java graphics.
Typical use cases include: standalone Python scripts to create an image, chart, or diagram; server side image creation for the web (for example a graph of share prices that updates hourly); desktop applications, particularly those that involve interactive images or diagrams.
The power of Pycairo, with the expressiveness of Python, is also a great combination for making procedural images such as mathematical illustrations and generative art. It is also quite simple to generate image sequences that can be converted to video or animated gifs.
1.1 Who is this book for?
This book is primarily aimed at developers who have at least a small amount of Python experience, who are looking to use Python to create computer graphics for any application. The examples in the book use basic Python constructs, you don’t need to be a Python guru to learn Pycairo. No prior knowledge of computer graphics is assumed, although if you have used other graphics systems you should still find this book useful as Pycairo has its own unique quirks and features.
1.2 About the author
Martin McBride is a software developer, specialising in computer graphics, sound, and mathematical programming. He has been writing code since the 1980s in a wide variety of languages from assembler through to C++, Java and Python. He writes for PythonInformer.com and is the author of Functional Programming in Python available on leanpub.com. He is interested in generative art and works on the generativepy open source project.
1.3 Keep in touch
If you have any comments or questions you can get in touch by any of the following methods:
- Joining the Python Informer forum at http://pythoninformer.boards.net/. Follow the Computer Graphics in Python board in the Books section.
- Signing up for the Python Informer newsletter at pythoninformer.com
- Following @pythoninformer on twitter.
- Contacting me directly by email (info@axlesoft.com).