LinearGradient
Explore how to create and control linear gradients in Pycairo. Understand setting gradient control points, adding color stops for smooth transitions, rotating gradients using coordinate calculations or user space transforms, and applying transparency. This lesson helps you master gradient fills to enhance your vector graphics.
We'll cover the following...
What is a linear gradient?
A linear gradient is a gradient that blends smoothly from one color to another. Here is an example of a circle filled with a linear gradient:
The source is a gradient pattern. As with the solid pattern, this fills the whole user space. When this is applied to the path, the resulting output is a circle filled with the gradient. The top of the circle is red and the bottom of the circle is blue. The color gradually changes from red to blue, as we move down the ...
This code is similar to the ...