...

/

Open and Closed Shapes

Open and Closed Shapes

Get introduced to open and closed shapes with Pycairo.

We'll cover the following...

In the previous lessons, we used the rectangle function. Generally, though, if we need to create any other type of shape, we construct it with separate lines and curves. Let’s start by drawing a simple straight line. Here is how a line is drawn on a surface:

Lines

Pycairo uses the idea of a current point when drawing shapes. This makes it easy to create common ...