Circle and Curves
Learn to make circles and curves with Pycairo.
We'll cover the following...
We'll cover the following...
Arcs
An arc is a part of the circumference of a circle. The arc function is called like this: ctx.arc(cx,cy,r,a1,a2)
The following image shows how these parameters are used to draw an arc:
The arc is part of a circle, with radius r and centered at the point (cx, cy). It starts at angle a1 and ends at angle a2. Angles are measured from the x-axis and, by default, increase as we move clockwise. Here is an example of the code used to draw an arc:
Angles in Python, as in most computer languages, are measured in radians rather than ...