Foreword
Get a brief introduction to the course.
We'll cover the following
About the course
In this course, we will use Python’s Pycairo library to learn how to draw complex shapes. We will start by outlining the difference between pixels and vector graphics. After that, we will learn to make some basic drawings and, then, we will move on to the drawing of more complex shapes.
Here is the list of topics that we will cover in this course:
- Introduction to vector graphics
- Basic drawing operations
- Paths and complex shapes
- Computer color
- Transform and state
- Working with text
- Gradients and image fills
- Clipping, masking, and compositing
- Surfaces and output formats
- Integration with other libraries
About Pycairo
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 drawing capabilities similar to those of other vector libraries and languages such as SVG, PDF, HTML canvas, and Java graphics.
Typical use cases include standalone Python scripts used to create an image, chart, or diagram; server-side image creation for the web (for example a graph of share prices that updates hourly); and 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. With this combination, it is also quite simple to generate image sequences that can be converted into videos or animated gifs.