Class Cairo.LinearGradient
- Description
A linear gradient.
- Inherit
Gradient
inherit Gradient : Gradient
- Method
create
Cairo.LinearGradient Cairo.LinearGradient(
float
|int
x0
,float
|int
y0
,float
|int
x1
,float
|int
y1
)- Description
Create a new LinearGradient along the line defined by (x0, y0) and (x1, y1). Before using the gradient pattern, a number of color stops should be defined using add_color_stop_rgb() or add_color_stop_rgba().
- Note
The coordinates here are in pattern space. For a new pattern, pattern space is identical to user space, but the relationship between the spaces can be changed with set_matrix().
- Parameter
x0
x coordinate of the start point
- Parameter
y0
y coordinate of the start point
- Parameter
x1
x coordinate of the end point
- Parameter
y1
y coordinate of the end point