Cairo.LinearGradient (gb.cairo)
Static Function LinearGradient ( X0 As Float, Y0 As Float, X1 As Float, Y1 As Float, Colors As Float[][] ) As CairoPattern
Creates a new linear gradient
Cairo pattern along the line defined by (
X0,
Y0) and (
X1,
Y1), and using color stops defined by the
Colors argument.
-
X0 : x coordinate of the start point.
-
Y0 : y coordinate of the start point.
-
X1 : x coordinate of the end point.
-
Y1 : y coordinate of the end point.
-
Colors : an array of color stops.
Each color stop is defined by an array of
Float, having the form
[ OffSet, Red, Green, Blue ]
or
[ OffSet, Red, Green, Blue, Alpha ]
.
The offset value is the relative position of the color stop between 0.0 and 1.0.
The colors are relative values between 0.0 and 1.0.
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 by setting the
CairoPattern.Matrix property.