Lines

Learn to draw lines at specific angles with Pycairo.

We can draw a line between two points, for instance points (x1, y1) and (x2, y2), like this:

ctx.move_to(x1, y1)
ctx.line_to(x2, y2)

Now, we will look at a couple of other examples.

Drawing a line of given length and angle

In ...